Jump to content

$_FILES


kapz22

Recommended Posts

$_FILES["userfile"] will be an array. The php.net upload documentation shows what elements it contains - http://us3.php.net/manual/en/features.file-upload.php

 

About the only time it would be NULL would be if uploads are not enabled on your server or the HTTP request for your page was not the result of a valid upload form with a form field by the name "userfile".

 

You can also see what is in the array using the following code -

 

echo "<pre>",print_r($_FILES,true),"</pre>";

Link to comment
https://forums.phpfreaks.com/topic/194446-_files/#findComment-1022748
Share on other sites

The ['error'] element will be a zero value if a file was selected and uploaded successfully.

 

Nothing else really makes sense. The ["name"] element can be set, but there can still be upload errors and the ["tmp_name"] element will never be the string "none".

Link to comment
https://forums.phpfreaks.com/topic/194446-_files/#findComment-1022757
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.