|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2003-07-10 10:24 UTC] sniper@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 19:00:02 2025 UTC | 
Description: ------------ Uploading files, e.g. JPGs or GIFs, using HTML form/PHP interface results in corrupted files. Reproduce code: --------------- HTML form fragment: ... <form method="post" enctype="multipart/form-data" action="update.php"><input type="file" name="image"> .... update.php fragment: ... copy("$image", "/www/image/$image_name") or die("Couldn't upload $image_name !"); ... Expected result: ---------------- Selected local file uploaded to the web server as "/www/image/$image_name" Actual result: -------------- File is indeed uploaded, file length is correct, but it is corrupted. Typically all 0x00 bytes are replaced with 0x20.