Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php write file

<?php
$file = 'people.txt';
// Open the file to get existing content
$current = file_get_contents($file);
// Append a new person to the file
$current .= "John Smith
";
// Write the contents back to the file
file_put_contents($file, $current);
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #write #file
ADD COMMENT
Topic
Name
3+2 =