0
votes

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.

2
Yeah accept some answers but anyways post some code because if your enctype is ok we need to see some code something is wrong.Iznogood
Please provide the code of the upload form, php file.Zoli

2 Answers

4
votes

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

as:

<form action="me.php" enctype="multipart/form-data" method="post">
</form>
0
votes

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

ENCTYPE="MULTIPART/FORM-DATA"

What OS is your server running?