File uploads in Windows simply doesn't work.
It appears that nothing is happening, the upload doesn't get carried out...
<pre>
$upload_dir="c:\apache\htdocs\cdyou\";
$upload_tmp_path=ini_get("upload_tmp_dir");
$arquivo=stripslashes($arquivo);
$newfile=$upload_dir."file.tmp";
chdir($upload_tmp_path);
if(!copy($arquivo,$newfile))
echo "<p><font face=tahoma size=2><b>Erro no upload de $newfile.</b></font></p>";
else
{
process_file($newfile);
}
</pre>
it gives me a Warning message that the file could not be opened for reading. Of course, it wasn't uploaded.
my form is like this:
<pre><form name="fileup" action="<?=basename($PHP_SELF)?>" enctype="multipart/form-data" method="post" onSubmit="if(document.fileup.arquivo.value.length<3) { alert('O campo arquivo tem que ter no minimo 3 letras.'); return false; }">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="hidden" name="action" value="doit">
<input type="file" name="arquivo"></td></tr></table>
<p align=center><input type="submit" value="Enviar"></p>
</form>
</pre>
what is wrong here??