Jump to content

[SOLVED] creating upload script, but stuck


intodesi

Recommended Posts

ok it seems to go through all my error checks except this one

 

 if(!is_writable($upload_path))
      die('You cannot upload to the specified directory, it is not writeable.');

 

using my webbased filemanager i set permissions to 777 on the directory in questions, and in the web based file manager it says the directory is 777 but when i look at it with wsftp it says its 755, and when i try and change the directory to 777 from wsftp it wont update...

 

so not sure if its because the folder isnt updating to 777 or if the script just doesnt work like how I want it to.

 

Any idea's appreciate.

 

Intodesi

 

Link to comment
Share on other sites

ok think I solved that, but now I am getting this error

 

Warning: move_uploaded_file(http;//zinto-design.com/clients/clients/uploads/back.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/techurch/public_html/zinto/clients/clients/upload.php on line 38

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpz00aWv' to 'http;//zinto-design.com/clients/clients/uploads/back.jpg' in /home/techurch/public_html/zinto/clients/clients/upload.php on line 38

There was an error during the file upload. Please try again.

 

this is the code

 

   if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename))
         echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>'; 
      else
         echo 'There was an error during the file upload.  Please try again.';

Link to comment
Share on other sites

and i fixed something again.. and get yet another similiar error

 

 

Warning: move_uploaded_file(http://zinto-design.com/clients/clients/uploads/back.jpg) [function.move-uploaded-file]: failed to open stream: HTTP wrapper does not support writeable connections. in /home/techurch/public_html/zinto/clients/clients/includes/upload.php on line 38

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php2cmhJv' to 'http://zinto-design.com/clients/clients/uploads/back.jpg' in /home/techurch/public_html/zinto/clients/clients/includes/upload.php on line 38

There was an error during the file upload. Please try again.

 

same code as above for line 38

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.