I could be wrong, but I'd guess that filesize fails for remote files. If all you're doing is spitting out the text, why not use readfile()?
-philip On Mon, 27 Jan 2003, Guru Geek wrote: > 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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php