The requested method POST is not allowed

vladax

Новичок
The requested method POST is not allowed

upload.html
------------------------
<html><body>
<FORM ENCTYPE="multipart/form-data" ACTION="upload2.phtml" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
Имя файла: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Отправить">
</FORM>
</body></html>



upload2.phtml
--------------------------
<? move_uploaded_file($userfile, "/upload/"); ?>



Result
---------------------------
Method Not Allowed
The requested method POST is not allowed for the URL /upload2.phtml
Apache/1.3.27 Server at www.*****.ru Port 80



The Question is
-------------------------
Why the hell?
 

*.MOFF.*

Guest
камон баби
это страница - fileupload.php
PHP:
<?php
if($File)
{
echo "(file name: $File_name)<p>\n";
echo "(file size: $File_size)<p>\n";
if(copy ($File, "upload/$File_name")) 
{
echo "ok man";
} else {
echo "no shit";
}
unlink ($File);
}
?>
<form action=fileupload.php METHOD=POST ENCTYPE="multipart/form-data">
<input type=file name="File" size=20><br>
<input type=submit name=submit value=send>
</form>
 

FreeSpace

Чукча-читатель
Надо, чтобы в httpd.conf стояло AllowOverride All, а в .htaccess в соответствующей папке (где скрипт) - ворт это:
<Limit GET,POST>
order allow,deny
Allow from all
</Limit>
 
Сверху