Don't bother to respond people... worked out the issue - the double
backslashes in the name...
Cheers
Rich
-----Original Message-----
From: Rich Gray [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2002 21:14
To: [EMAIL PROTECTED]
Subject: [PHP] File upload on Win2k ...


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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to