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