Skip to content

Instantly share code, notes, and snippets.

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