rittwickbanerjee Posted July 27, 2008 Share Posted July 27, 2008 Hi, Friends, Can anyone give me source code/idea on "how to upload file from client computer to my server by using a php script assume that folder on server to store the uploaded files :- D:\users\uploaded_files Thank you Rittwick Banerjee Link to comment https://forums.phpfreaks.com/topic/116836-file-upload-to-the-server-idr-using-php/ Share on other sites More sharing options...
rittwickbanerjee Posted July 27, 2008 Author Share Posted July 27, 2008 Hi, Friends, Can anyone give me source code/idea on "how to upload file from client computer to my server by using a php script assume that folder on server to store the uploaded files :- D:\users\uploaded_files Thank you Rittwick Banerjee Link to comment https://forums.phpfreaks.com/topic/116836-file-upload-to-the-server-idr-using-php/#findComment-600783 Share on other sites More sharing options...
MFHJoe Posted July 27, 2008 Share Posted July 27, 2008 No need to bump the thread after 1 minute. Anyway, just make a form that looks something like: <form enctype="multipart/form-data" action="upload.php" method="post"> Upload File: <input name="file" type="file" /><br /> <input type="submit" name="submitfile" /> </form[code] Note the enctype - it's very important. Once the user submits the form the file gets uploaded to a temporary place on the server. You can access it with $_FILES['file']['tmp_name']. You need to move it to another location on your server (eg. D:\users\uploaded_files) using the move_uploaded_file() function. [/code] Link to comment https://forums.phpfreaks.com/topic/116836-file-upload-to-the-server-idr-using-php/#findComment-600789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.