Hello,

I'm a recent convert from CGI/Perl and so am still getting my feet wet
in PHP.

Here's my code:
$filename = "http://www.myserver.com/include/sometext.txt";;
$handle = fopen ($filename, "rb");
$contents = fread ($handle, filesize ($filename));
fclose ($handle);
echo $contents;
exit;

The problem is nothing shows up, it's a blank browser window.  I'm sure
this is a stupid questions and very easily fixed.

Also, if the text file I'm trying to read is multi lined, shouldnt I be
placing the contents into an array?  or is that old cgi habits coming
through?

Thanks,
Roger



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to