Jump to content

Image upload problem


gerkintrigg

Recommended Posts

Hi I'm having a problem with my image upload script...
It's showing an error:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: copy(../../../../shop/uploaded_images/m2kencode23.gif): failed to open stream: Permission denied in /hsphere/local/home/davetrig/magic2k.com/admin/shop/edit/item/got_image.php on line 95
Could not copy, please use the back button to try again.[/quote]

This is my code...
[code]if ((in_array($_FILES['imagefile']['type'], $image_types)) &&
($_FILES['imagefile']['size'] < 600000)) {

copy ($_FILES['imagefile']['tmp_name'], $root."shop/uploaded_images/".$_FILES['imagefile']['name'])
    or die ("Could not copy, please use the back button to try again.");
    $_SESSION['imgurl']='shop/uploaded_images/'.$_FILES['imagefile']['name'];
    echo "<BR><BR>Thank you, the following image was uploaded:<BR><BR><img src='".$root.$_SESSION['imgurl']."' [/code]

That's some of it anyway... I think that the error's in there somewhere (if it is a script error)...

Can anyone advise?

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/10433-image-upload-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.