File upload on Win2k ...

From: Date: Wed, 27 Nov 2002 05:14:23 +0000
Subject: File upload on Win2k ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126179@lists.php.net to get a copy of this message
PHP v4.2.3 Win2K Sp2 Apache v1.3.24 I'm testing some file upload code for a image library type site and the file upload keeps failing... here's some code to explain what the issue is... <? // The form has been posted and we are processing the posted data print_r($_FILES); copy($_FILES['userpic']['tmp_name'],'c:/test.jpg'); echo (is_uploaded_file($_FILES['userpic']['tmp_name']) ? '<br>Uploaded' : '<br>Not Uploaded'); ?> This outputs the following:- Array ( [userpic] => Array ( [name] => garden.jpg [type] => image/pjpeg [tmp_name] => C:\\WINNT\\TEMP\\phpC0.tmp [error] => 0 [size] => 59501 ) ) Not Uploaded The copy() function works in that the temp file is copied to c:\test.jpg. So why is is_uploaded_file() returning false? TIA Rich

« previous php.general (#126179) next »