displaying path to image and not the image itself

  • dmc_gryphonit
  • Newbie
  • Newbie
  • dmc_gryphonit
  • Posts: 12

Post 3+ Months Ago

hi there.

i have a lil problem regarding product images. i am sure its an easy one to sort out but its really nagging me and i cant seem to rectify it. i have a wamp server and a remote server. the images are displaying fine on the wamp but on the remote server i just get the http path to the image
Code: [ Select ]
www dot itinwales dot co dot uk/image.php?bigImg=LAMPNEC64.jpg


is this to do with a GD library or is it something else? i have compared both php files for the wamp and the remote and they both look to be fine

my wamp server php file calls the image like this
Code: [ Select ]
$imagePath = (isset($imagePath) && trim($imagePath) != "" ? urldecode($imagePath) : 'noimage.jpg');
    $imagePath = 'wamp/itinwales/webstore/images/product_images/'. $imagePath;
 header('Content-type: image/jpeg');
    if (fileExists($imagePath)) {
        resizeImage($imagePath, $new_height, $new_width, $newHeight, $newWidth);
        $destimg=ImageCreateTrueColor($new_width,$new_height) ;
        $srcimg=ImageCreateFromJPEG($imagePath) ;
        ImageCopyResized($destimg, $srcimg, 0, 0, 0, 0, $new_width, $new_height, ImageSX($srcimg), ImageSY($srcimg));
  imagejpeg($destimg);
 }
  1. $imagePath = (isset($imagePath) && trim($imagePath) != "" ? urldecode($imagePath) : 'noimage.jpg');
  2.     $imagePath = 'wamp/itinwales/webstore/images/product_images/'. $imagePath;
  3.  header('Content-type: image/jpeg');
  4.     if (fileExists($imagePath)) {
  5.         resizeImage($imagePath, $new_height, $new_width, $newHeight, $newWidth);
  6.         $destimg=ImageCreateTrueColor($new_width,$new_height) ;
  7.         $srcimg=ImageCreateFromJPEG($imagePath) ;
  8.         ImageCopyResized($destimg, $srcimg, 0, 0, 0, 0, $new_width, $new_height, ImageSX($srcimg), ImageSY($srcimg));
  9.   imagejpeg($destimg);
  10.  }
which brings thru the image i want to see.

my remote server brings the image like this
Code: [ Select ]
$imagePath = (isset($imagePath) && trim($imagePath) != "" ? urldecode($imagePath) : 'noimage.jpg');
    $imagePath = 'http://www dot itinwales dot co dot uk/webstore/images/product_images/'. $imagePath;
 header('Content-type: image/jpeg');
    if (fileExists($imagePath)) {
        resizeImage($imagePath, $new_height, $new_width, $newHeight, $newWidth);
        $destimg=ImageCreateTrueColor($new_width,$new_height) ;
        $srcimg=ImageCreateFromJPEG($imagePath) ;
        ImageCopyResized($destimg, $srcimg, 0, 0, 0, 0, $new_width, $new_height, ImageSX($srcimg), ImageSY($srcimg));
  imagejpeg($destimg);
 }
  1. $imagePath = (isset($imagePath) && trim($imagePath) != "" ? urldecode($imagePath) : 'noimage.jpg');
  2.     $imagePath = 'http://www dot itinwales dot co dot uk/webstore/images/product_images/'. $imagePath;
  3.  header('Content-type: image/jpeg');
  4.     if (fileExists($imagePath)) {
  5.         resizeImage($imagePath, $new_height, $new_width, $newHeight, $newWidth);
  6.         $destimg=ImageCreateTrueColor($new_width,$new_height) ;
  7.         $srcimg=ImageCreateFromJPEG($imagePath) ;
  8.         ImageCopyResized($destimg, $srcimg, 0, 0, 0, 0, $new_width, $new_height, ImageSX($srcimg), ImageSY($srcimg));
  9.   imagejpeg($destimg);
  10.  }


this coding returns "www dot itinwales dot co dot uk/image.php?bigImg=LAMPNEC64.jpg" in a text format on the browser. how can i rectify this?

thank you for your time
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • dennisaduval
  • Newbie
  • Newbie
  • dennisaduval
  • Posts: 5

Post 3+ Months Ago

just curious have you tried removing the first part of the url and just placing the relative path.

example = /webstore/images/product_images/

or //product_images/

Just a thought, i don't work with this stuff too much, but this sometimes fixes some of my problems doing it this way im my cms system.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 160 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.