Try something like this:
$txt = "user id date";
$myfile = file_put_contents('logs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);
More Related Contents:
- PHP mail() issue
- (PHP) Warning: file_get_contents() [function.file-get-contents]: couldn’t resolve host name
- How to drop empty responses in an array of fields?
- How to use this code my wordpress theme
- How to change mysql to mysqli?
- How to check if an email address exists without sending an email?
- What is stdClass in PHP?
- How to make PDF file downloadable in HTML link?
- PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string
- Count number of values in array with a given value
- Which is faster in PHP, $array[] = $value or array_push($array, $value)?
- Posting raw image data as multipart/form-data in curl
- curl_exec() always returns false
- Using MySQLi from another class in PHP
- Checking if all the array items are empty PHP
- How to override trait function and call it from the overridden function?
- Passing PHP variable into JavaScript [duplicate]
- PHP how to import all classes from another namespace
- What is PHP session_start()
- Storing database connection in a session variable [duplicate]
- Javascript function post and call php script
- Getting all dates for Mondays and Tuesdays for the next year
- php call class function by string name
- Extract floating point numbers from a delimited string in PHP
- PHP PDO how to run a multiple query request?
- Add a line break in Woocommerce Product Titles
- cURL error 60: SSL certificate prblm: unable to get local issuer certificate [duplicate]
- dynamic class names in php
- Method Chains PHP OOP
- PHP “&” operator