|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-03 18:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 14:00:02 2025 UTC |
When I use php to perform a file upload, it results in an empty file being placed on the server. The file name is right, the file extension is right, but the file is simply empty. Calling up the image in a browser yields a broken image. My server is running php 4.0.4pl1 and for certain reasons out of my control, I cannot upgrade it. Is this a known problem for this build? Please let me know. If this is the case, then I will be able to convince the admins that they need to upgrade to a later build. Code: function do_upload($filename,$newname) { $file = basename($filename); $tmp_upload_path = "/tmp/"; $new_file_name = "/aa/cvsro/tltc/funding/proposals/" . $newname; if (!copy($tmp_upload_path.$file, $new_file_name)) echo "failed to copy file<br>\n"; return; } Thanks!