Skip to content

Instantly share code, notes, and snippets.

@freshsnippets
Created May 3, 2012 03:14
Show Gist options
  • Save freshsnippets/2582763 to your computer and use it in GitHub Desktop.
Save freshsnippets/2582763 to your computer and use it in GitHub Desktop.
PHP: Open a File
$my_file = 'file.txt';
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //open file for writing ('w','r','a')...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment