Re: [PHP] output of fread() is blank - FIXED - updated

2003-01-27 Thread Guru Geek
In all actuality I will be manipulating the information that is in that file. I'm trying to build a log in script. The id's and passwords are stored in a text file. I'm trying to read that text file so I can compare what the user/viewer had typed in the id and password boxes. I'm so new to PHP

Re: [PHP] output of fread() is blank - FIXED - updated

2003-01-27 Thread Philip Olson
On Mon, 27 Jan 2003, Guru Geek wrote: > Sorry, here is the code now ( I need a nap ) > > $filename > ="/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; > $handle = fopen ($filename, "r"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo $conte

Re: [PHP] output of fread() is blank - FIXED - updated

2003-01-27 Thread Guru Geek
Sorry, here is the code now ( I need a nap ) $filename ="/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); echo $contents; exit; Guru Geek wrote: > Here's my code now: >

Re: [PHP] output of fread() is blank - FIXED

2003-01-27 Thread Guru Geek
Here's my code now: $filename = "/usr/local/plesk/apache/vhosts/myserver.com/httpdocs/include/text.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); echo readfile($filename); exit; now it displays the contents of the text.txt file. I ori

Re: [PHP] output of fread() is blank

2003-01-27 Thread Philip Olson
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 ($fi

Re: [PHP] output of fread() is blank

2003-01-27 Thread Jason Sheets
Hello, The PHP manual page for filesize (http://www.php.net/manual/en/function.filesize.php) mentions that it will not work on remote files. fread will stop once n number of bytes are read or EOF is received so you could set this to the maximum file size (in bytes) that you want to download. Jas

[PHP] output of fread() is blank

2003-01-27 Thread Guru Geek
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 pro