![]() |
file upload with php
Total noob here, please be kind.
I am trying to script an file upload form without success. move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'], "/piperp86/public_html/useruploads/{$_FILES['uploadFile'] ['name']}"); echo "File uploaded."; if($_FILES['uploadFile'] ['error'] > 0) { switch ($_FILES['uploadFile'] ['error']) { case 1: echo 'File exceeded maximum server upload size'; break; case 2: echo 'File exceeded maximum file size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No file uploaded'; break; } } else { echo 'File successfully uploaded'; } } ?> <form enctype="multipart/form-data" action="upload.php" method="post"> Select File: <input type="file" name="uploadFile"/> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"/> <input name="SubmitB" type="submit" value="Upload File"/> </form> The error I get is: Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 32979/32982 is not allowed to access / owned by uid/gid 0/0 in /home/piperp86/public_html/upload.php on line 9 File uploaded.File successfully uploaded The folder useruploads has write privileges. My web is hosted by ehostpros. Could it be that they don't allow uploads from web pages? The file is not uploaded. thanks for reading. piper |
All times are GMT -8. The time now is 04:26 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.