Uploading image file from website on yahoo server causes 410 gone error message when trying to acces

Posted by creocare on Stack Overflow See other posts from Stack Overflow or by creocare
Published on 2010-06-03T18:37:56Z Indexed on 2010/06/03 18:44 UTC
Read the original article Hit count: 409

Filed under:
|
|
|
|

I have a form that lets users upload a photo of themselves. This seems to work. The photo does exist on the server once uploaded. When I try to access the file I get a "403 forbidden - you don't have permission to access this url on this sever" and also I get "Additionally, a 410 Gone error was encountered while trying to use an ErrorDocument to handle the request."

This is the code I have for uploading the image.

$target_path = "images/";

$target_path = $target_path . basename( $_FILES['uploadpic']['name']);

if(move_uploaded_file($_FILES['uploadpic']['tmp_name'], $target_path))
 {
    echo "The file ". basename( $_FILES['uploadpic']['name']). " has been uploaded";
 } 
else
 {
echo "There was an error uploading the file, please try again!";
 }

© Stack Overflow or respective owner

Related posts about php

Related posts about image