file put contents with a new line

141

$file = 'file.txt';

file_put_contents($file, 'Hello World');

// file put contents with file append
$file = 'file.txt';
file_put_contents($file, "\nMore Test", FILE_APPEND);

// If you're using notepad check your version and update to the latest.

Comments

Submit
0 Comments