I'm not sure of the backwards compatibility, but if you're running PHP 4.2.x (I think? Maybe it came in earlier) .. use the $_FILES global variable, in place of $HTTP_POST_FILES. The array is exactly the same: $_FILES[name_of_file][attributes]

Hopefully this helps?

-Jason

Cyrille Andres wrote:



Hello everybody,


I want to allow the client to upload a text file on my web server, so I use
this code :



Uploaded files details


", $HTTP_POST_FILES["userfile"]["name"]);
printf("Temporary Name : %s
",
$HTTP_POST_FILES["userfile"]["tmp_name"]);
printf("Size : %s
", $HTTP_POST_FILES["userfile"]["size"]);
printf("Type : %s
", $HTTP_POST_FILES["userfile"]["type"]);

if (copy
($HTTP_POST_FILES["userfile"]["tmp_name"],"temp/".$HTTP_POST_FILES["userfile
"]["name"]))
{
printf("File successfully copied");}
else{
printf("Error: failed to copy file");}


?>

the $http_post_files doesn't return me anything, anybody would have a clue
?? ( roughly speaking I am not able to retrieve the field the client try to
send me).

Thanks a lot.

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

Reply via email to