Jump to content

Recommended Posts

Ok, well i have a file form, for some odd reason it won't move directories from the tmp directory, here is the following code,

i will point out the error it spews out after the code

[code]
$uploadedfile = $_FILES['images1']['tmp_name'];

// Create an Image from it so we can do the resize
$src = imagecreatefromjpeg($uploadedfile);
$src2 = imagecreatefromjpeg($uploadedfile);

// Capture the original size of the uploaded image
list($width,$height)=getimagesize($uploadedfile);

// For our purposes, I have resized the image to be
// 600 pixels wide, and maintain the original aspect
// ratio. This prevents the image from being "stretched"
// or "squashed". If you prefer some max width other than
// 600, simply change the $newwidth variable


$newwidth = 800;
$newheight = 600;
$newwidth2 = 100;
$newheight2 = 100;
$tmp=imagecreatetruecolor($newwidth,$newheight);
$tmp2 = imagecreatetruecolor($newwidth2, $newheight2);
// this line actually does the image resizing, copying from the loriginal
// image into the $tmp image
if(imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height)){
$imagename = $_FILES['image']['name'];
$filename = "C:\\xampp\\xampp\\htdocs\\localfind2\\localfind\\img upload\\imgup\\img\\";
$tmp=imagecreatetruecolor($newwidth,$newheight);
$folder = "Clients";

//checking to see if the function is working properly due to web drive not supporting
imagejpeg($tmp,$filename,100);


} else {
echo "nay";
}
[/code]

the error is

[quote]
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'C:\xampp\xampp\htdocs\localfind2\localfind\img upload\imgup\img\' for writing in C:\xampp\xampp\htdocs\localfind2\localfind\img upload\imageup.php on line 68
[/quote]

tryed everything, the path is correct because i have another feild that deals with pdfs and its moving properly
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.