Pages

Read txt File

This snippet opens a file, reads content from it and closes it.
<?php
$myFile 
= "text.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, 5); fclose($fh);
echo 
$theData; ?>

No comments:

Post a Comment