Re: Problem with files

From: Date: Sat, 18 Nov 2000 20:23:05 +0000
Subject: Re: Problem with files
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3975@lists.php.net to get a copy of this message
sounds like you're opening the file as non-binary - add a 'b' to the fopen() function : $fp = fopen ("/tmp/file.ext", "rb"); siggy ----- Original Message ----- From: "Mladen Stific" <mstific@inet.hr> To: <php-windows@lists.php.net> Sent: Sunday, November 19, 2000 7:45 AM Subject: [PHP-WIN] Problem with files > I am using a suggested "image gallery" script from Zend tutorial. I have > thrown out most of the stuff from the script, just keeping the basics, to > seee if it works. > > I request a file name in a form, via an <INUT TYPE="file"... tag. I send > that name to another script, and open the file. Then I take chunks of 8K and > read them using fread(). What happens is that fread() encounters a byte > value of 26, which represents EOF marker and simply stops reading. It drives > me nuts! > > This is all happening on Win98SE, Apache 3.1.14 and PHP 4 (I can't remember > the exact version number and am too lasy to find out :-)) ) > > Anyway, this reminds me of binary safe reading issues... Is there some way > to tell PHP to read the chunk I told it to and just keep it's oppinions > about what it read to itself? > > Thanx :-) > -Mladen > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.windows (#3975) next »