Fsoft Posted July 2, 2008 Share Posted July 2, 2008 Hi I want to make a simple script, Which will have an HTML Browse button, and a submit button, And once submited we will have to set a directory on server for example /upload And once we submit, that file will be uploaded to /upload directory. AND YA I will make upload directory 777 <CHMOD> So php script will able to write it Please help Thanks a lot FAISAL! Link to comment https://forums.phpfreaks.com/topic/112982-php-file-upload/ Share on other sites More sharing options...
lemmin Posted July 2, 2008 Share Posted July 2, 2008 From http://msdn.microsoft.com/en-us/library/ms535263(VS.85).aspx : <FORM NAME="oForm" ACTION="repost.php" ENCTYPE="multipart/form-data" METHOD="post"> <INPUT TYPE="file" NAME="oFile1"/> <INPUT TYPE="submit" VALUE="Upload File"> </FORM> For php: move_uploaded_file($_FILES['oFile1']['tmp_name'], "upload/".$_FILES['oFile1']['name']); Here is documentation for that: http://www.php.net/manual/en/function.move-uploaded-file.php Good luck! Link to comment https://forums.phpfreaks.com/topic/112982-php-file-upload/#findComment-580347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.