Skip to content

Instantly share code, notes, and snippets.

@alexstep
Created October 4, 2012 10:30
Show Gist options
  • Save alexstep/3832789 to your computer and use it in GitHub Desktop.
Save alexstep/3832789 to your computer and use it in GitHub Desktop.
php wrtite file
// http://www.php.su/functions/?fopen
$filecontent = 'some content';
$file = fopen($_SERVER["DOCUMENT_ROOT"]."/path/name.txt","w+");
fputs($file, $filecontent);
fclose($file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment