PHP Code:
$tmp_name = $_FILES['image'] ['tmp_name'];
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefrompng($tmp_name);
$image = imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
$image_name=md5(time()).'.'.$extension;
$newname="images/$name".$image_name;
$copied = copy($image, $newname);
this is what i was planning on doing for moving and resizing the images.
but it gives an error
Code:
Warning: copy(1) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\testing\i.php on line 34
Warning: copy(1) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\testing\i.php on line 34
Warning: copy(1) [function.copy]: failed to open stream: No such file or directory in C:\wamp\www\testing\i.php on line 34
Bookmarks