Results 1 to 10 of 12
-
13th Jul 2011, 08:14 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.cophp resize
hi
ive coded with help an php image resize code, to go in upload.php, ill show:
PHP Code:
include"imagecfg.php";
//Make a 90x90px thumbnail......
$fulluploadlPath = $thumbDir.$name;
$img = imagecreatefromjpeg($fulluploadlPath);
$img = imagecreatefrompng($fulluploadlPath);
$img = imagecreatefromgif($fulluploadlPath);
if (!$img) { echo "<h1>Error: Couldn't open image to create thumbnail!</h1>" ; }
else {
$newW = round(($thumbPixels / $height) * $width); //thumnail width
$newImg = imagecreatetruecolor ($newW, $thumbPixels);
imagecopyresampled ($newImg, $img, 0, 0, 0, 0, $newW, $thumbPixels, $width, $height);
$thumbfilename = $thumbDir .'/'. $thumbName;
imagejpeg($newImg, $thumbnName) or die("<h1>Error: Couldn't save thumnbail!</h1>");
echo "<img src='$thumbName'>" ;
}
Code:Warning: imagecreatefromjpeg(images/thumbs/1310586947.png) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in C:\wamp\www\includes\imageupload.php on line 28 Warning: imagecreatefrompng(images/thumbs/1310586947.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in C:\wamp\www\includes\imageupload.php on line 29 Warning: imagecreatefromgif(images/thumbs/1310586947.png) [function.imagecreatefromgif]: failed to open stream: No such file or directory in C:\wamp\www\includes\imageupload.php on line 30
Thx
Chris2k Reviewed by Chris2k on . php resize hi ive coded with help an php image resize code, to go in upload.php, ill show: include"imagecfg.php"; //Make a 90x90px thumbnail...... $fulluploadlPath = $thumbDir.$name; Rating: 5
-
13th Jul 2011, 08:19 PM #2Member
Is the path to your images correct?
It looks like you are now pointing the script to:
C:\wamp\www\includes\images/thumbs/1310586947.png
-
13th Jul 2011, 08:25 PM #3It begins...
Definitely an image path issue. What's your image path that is being used? Tell us that.
-
13th Jul 2011, 08:36 PM #4OPBannedWebsite's:
WarezRelease.org ThatHosting.coi notoced tht as soon as i posted:
$fulluploadlPath = $thumbDir.$name is the thumb dir to save the thumbs in.
so i change to:
$fulluploadlPath = $uploadDir.'/'.$name;
now the page isnt even displayin since i change.
ideas?
Ps: Im using wamp to prepare the script.
-
13th Jul 2011, 08:56 PM #5OPBannedWebsite's:
WarezRelease.org ThatHosting.comy stupid mistake, $thumbDir is the thumb directory, i needed $uploadDir...
anyways i changed it, now im getting parse error on tis line:
PHP Code:$fulluploadlPath = $uploadDir.'/' $name;
-
13th Jul 2011, 09:01 PM #6It begins...PHP Code:
$fulluploadlPath = $uploadDir . '/' . $name;
-
13th Jul 2011, 09:02 PM #7MemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
-
13th Jul 2011, 09:02 PM #8Member
$fulluploadlPath = $uploadDir.'/' . $name;
-
13th Jul 2011, 09:13 PM #9OPBannedWebsite's:
WarezRelease.org ThatHosting.coThanks Guys.
but now my site wont load, i added:
$fulluploadlPath = $uploadDir . '/' . $name;
and now i getP:
The connection to the server was reset while the page was loading.
-
13th Jul 2011, 09:23 PM #10It begins...
Lol, try restarting your server?
EDIT: After the line above $fulluploadpath.....
Add these two lines and tell us the output:
PHP Code:echo $fulluploadlPath;
exit();
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Resize Image
By cyb3r in forum Graphics AreaReplies: 1Last Post: 15th Sep 2011, 02:50 PM -
Looking for some new Image resize mod
By Spartan in forum phpBBReplies: 1Last Post: 27th May 2011, 08:58 AM -
Image resize in DLE
By John in forum Webmaster DiscussionReplies: 1Last Post: 30th Dec 2010, 01:31 AM -
PHP Resize?
By bxflow in forum Web Application/Script SupportReplies: 5Last Post: 7th Sep 2010, 03:36 PM -
how to resize image in DL
By loverhaker in forum Forum and DDL DiscussionReplies: 0Last Post: 28th Aug 2010, 01:48 AM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...