home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Developers / Alleycode HTML Editor 2.2 / alleycodesetup.exe / {app} / PHP / fread.php < prev    next >
Encoding:
PHP Script  |  2003-11-08  |  220 b   |  11 lines

  1. <?php
  2.  
  3. // get contents of a file into a string
  4. $filename = "/usr/local/something.txt";
  5. $handle = fopen ($filename, "r");
  6. $contents = fread ($handle, filesize ($filename));
  7. fclose ($handle);
  8.  
  9. echo $contents;
  10.  
  11. ?>