Jump to content

Recommended Posts

Warning: copy(corries_dev/images/gallery/Autumn Leaves.jpg) [function.copy]: failed to open stream: No such file or directory in /home/corrieso/public_html/corries_dev/admin.php on line 76

 

Code.... (Lines 65 to 79, ex tags)

 

<?php
	$idir = "corries_dev/images/gallery/";								// Path To Images Directory
	$tdir = "corries_dev/images/gallery/thumbs/";						// Path To Thumbnails Directory
	$twidth = "150";										// Maximum Width For Thumbnail Images
	$theight = "150";										// Maximum Height For Thumbnail Images
	$lwidth = "600";										// Maximum Width For Thumbnail Images
	$lheight = "480";										// Maximum Height For Thumbnail Images

	  $type = $_FILES['imagefile']['type'];
	  if($type == "image/jpg" || $type == "image/jpeg" || $type == "image/pjpeg"){
		$file_ext = strrchr($_FILES['imagefile']['name'], '.');   // Get The File Extention In The Format Of , For Instance, .jpg, .png or .php
		$rand = rand(1,99999);
		$copy = copy($_FILES['imagefile']['tmp_name'], "$idir" . $_FILES['imagefile']['name']);   // Move Image From Temporary Location To Permanent Location
		$url = $_FILES['imagefile']['name'];   // Set $url To Equal The Filename For Later Use

		if($copy){   // If The Script Was Able To Copy The Image To It's Permanent Location
?>

 

Done CHMOD 777, script works fine on another site, the directory IS there.

 

Link to comment
https://forums.phpfreaks.com/topic/156153-copy-function-error-directory-not-found/
Share on other sites

Thanks but still problems:

 

Warning: move_uploaded_file(images/gallery/Tree.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/corrieso/public_html/corries_dev/admin.php on line 76

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpk2kq6Q' to 'images/gallery/Tree.jpg' in /home/corrieso/public_html/corries_dev/admin.php on line 76

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.