copy() or move_uploaded_file
Posted: Thu Apr 22, 2010 12:37 pm
hi all,
i am creating a php script that will allow my user to upload an image from there computer to a folder on my website..
problem is that i am using godaddy shared hosting and the temp folder they use for php uploads is outside my sites root and thus gives me permission problems when i try to copy or move the temp file to a given directory..
the line of code that spits out the error is - $copy = copy($_FILES['imagefile']['tmp_name'], "$idir" . $_FILES['imagefile']['name']); // Move Image From Temporary Location To Permanent Location
i get a permissions problem as stated and godaddy said that i can not change the permissions on the said temp folder that i am copying from.. they did say that perhaps i can use a different command.. i tried move_uploaded_file but still get the same error.. does anyone have ANY advise..
erik
i am creating a php script that will allow my user to upload an image from there computer to a folder on my website..
problem is that i am using godaddy shared hosting and the temp folder they use for php uploads is outside my sites root and thus gives me permission problems when i try to copy or move the temp file to a given directory..
the line of code that spits out the error is - $copy = copy($_FILES['imagefile']['tmp_name'], "$idir" . $_FILES['imagefile']['name']); // Move Image From Temporary Location To Permanent Location
i get a permissions problem as stated and godaddy said that i can not change the permissions on the said temp folder that i am copying from.. they did say that perhaps i can use a different command.. i tried move_uploaded_file but still get the same error.. does anyone have ANY advise..
erik