tags:

views:

28

answers:

2

hi i am working in php. when i upload a file before uploading i just print the file array by using print_r($_FILES); it will print following array.

[image] => Array ( [name] => [type] => [tmp_name] =>

[error] => 4 [size] => 0 ) )

so whats reason besides it that will not give actual file attributes. please help me. thanks in advance

+4  A: 

To the upload form, you must add the enctype multipart/form-data

as:

<form action="me.php" enctype="multipart/form-data" method="post">
</form>
Garis Suero
thanksyeah i used this enctype="multipart/form-data" but still same problem
Praveen kalal
Please paste more code, so we can figure it out...
Garis Suero
A: 

In your form, are you setting the encoding type correctly?

ENCTYPE="MULTIPART/FORM-DATA"

What OS is your server running?

jerebear
thanks yeah i used this enctype="multipart/form-data" but still same problem. andos is windows xp sp-2
Praveen kalal
For some reason I have had problems using $_FILES on windows servers. Google search did not come up with anything.Have you checked the relevant file-upload settings in your php.ini file?
jerebear