Re: output of fread() is blank

From: Date: Mon, 27 Jan 2003 23:39:18 +0000
Subject: Re: output of fread() is blank
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133317@lists.php.net to get a copy of this message
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)); [snip] See: http://www.php.net/filesize You cannot use it with urls. Also if you can help it, don't go through http like this. But anyway, see also: file(), fgets(), and include() Regards, Philip

« previous php.general (#133317) next »