[thelist] PHP-fileupload

Melvin Isken evolt at melvin-isken.de
Sat May 18 13:26:01 CDT 2002

[ Converted text/html to text/plain ]
Hi out there!
What´s wrong with this:
This is my html-file (upload.htm)
<form ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST">
<input type="file" name="userfile"/>
<input type="submit" value="Upload" name="bu1" />
This is the php-file (upload.php):
echo "button pressed<br>";       <-works
echo $userfile."<br>";               <-works
echo $userfile_name."<br>";     <-works
echo $userfile_size."<br>";        <-works
echo $userfile_type."<br>";       <-works
if(!copy($userfile,"./$userfile_name")){               <-doesn´t work!!!
            echo "<br>error";
The file is uploaded to the temp directory but not copied to the dir I
actually want it to be copied(I also tried another dirs for ex. 'upload') I
changed the dir-mod to 777. It doesn´t work.
The test account is at the members.evolt.org-server.

More information about the thelist mailing list