Reply to file upload problem

Your name:

Reply:


Posted by ljuljacka on 10/11/06 23:59

I'm just trying to run a fileupload script from the manual, just to see how
it works, and it won't. I've checked if file upload is enabled and it is.
Also, the file I'm trying to upload is smaller then max. The folder I'm
trying to upload files to is ./ispit1. I always get the "wrong" echo from
the script when I run debug in my editor and when I run it in my browser
(firefox) I get the following message:
"The requested URL /ispit/__URL__ was not found on this server."
The file isn't transfered to tmp directory either.
Any help is welcome.

<form enctype="multipart/form-data" action="__URL__" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>


<?php
$uploaddir = './ispit1/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация