Hi,
Lets say I have a .txt file in a directory.
Using PHP, how would I write a script that would display the contents of that txt file?
thanx
$fp = fopen("/path/to/file","r"); while (!feof($fp)) { echo fgets($fp,4096); }
or you can do this:
include "/path/to/file";
Chris' suggestion is best.
Phil, use echo implode('', file('/path/to/file'));
instead of your loop for this functionality