Activity Stream
48,167 MEMBERS
6698 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default php 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$img0000$newW$thumbPixels$width$height);
                        
    $thumbfilename $thumbDir .'/'$thumbName;
                        
                        
    imagejpeg($newImg$thumbnName) or die("<h1>Error: Couldn't save thumnbail!</h1>");
                        
                        echo 
    "<img src='$thumbName'>" ;
                    } 
    can any1 help me fix these errors:

    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

  2.   Sponsored Links

  3.     
    #2
    Member
    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

  4.     
    #3
    It begins...
    Definitely an image path issue. What's your image path that is being used? Tell us that.

  5.     
    #4
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    i 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.

  6.     
    #5
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    my 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
    plz help.

  7.     
    #6
    It begins...
    PHP Code: 
    $fulluploadlPath $uploadDir '/' $name

  8.     
    #7
    Member
    Website's:
    zomgbbqpizza.com evilddl.com scenemarket.org
    Code: 
    $fulluploadlPath = $uploadDir.'/'.$name;

  9.     
    #8
    Member
    $fulluploadlPath = $uploadDir.'/' . $name;

  10.     
    #9
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    Thanks 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.

  11.     
    #10
    It 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(); 

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Resize Image
    By cyb3r in forum Graphics Area
    Replies: 1
    Last Post: 15th Sep 2011, 02:50 PM
  2. Looking for some new Image resize mod
    By Spartan in forum phpBB
    Replies: 1
    Last Post: 27th May 2011, 08:58 AM
  3. Image resize in DLE
    By John in forum Webmaster Discussion
    Replies: 1
    Last Post: 30th Dec 2010, 01:31 AM
  4. PHP Resize?
    By bxflow in forum Web Application/Script Support
    Replies: 5
    Last Post: 7th Sep 2010, 03:36 PM
  5. how to resize image in DL
    By loverhaker in forum Forum and DDL Discussion
    Replies: 0
    Last Post: 28th Aug 2010, 01:48 AM

Tags for this Thread

BE SOCIAL