Skip to content

Instantly share code, notes, and snippets.

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