ID: 9806
Updated by: sniper
Old-Status: Open
Status: Closed
Bug Type: Filesystem function related
Assigned To: 


ie. Just add  the 'b':

fopen("", "rb"
fopen("", "wb"


Previous Comments:

[2001-03-17 13:35:52] [EMAIL PROTECTED]
Thank you Jani!
This is the code:

if($fd_url = fopen("", "r"))
        $fd_img = fopen("c:\some_picture.jpg", "w");
        while (!feof($fd_url))
                $buffer = fread($fd_url, 4096);
                fwrite($fd_img, $buffer, strlen(buffer));



[2001-03-17 13:20:17] [EMAIL PROTECTED]
What was the fopen() line you have used?



[2001-03-17 06:51:05] [EMAIL PROTECTED]
I have two web servers with Windows 2000 running on them.
One of them uses as a web server Microsoft IIS and the other one Apache 1.3.19 for 
Windows. I have a php script which connects to a remote web server and grabs an image. 
The image is written on a file (with fwrite function) and saved on the local harddisk. 
If I run the php script on IIS the image is saved correctly. If I run the php script 
on Apache the image is corrupted (has a larger length in bytes; usually, between 1-50 


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to