GD Library Help

software development

#1

Hello,

I am using this beyond simple script to get the height of an image. When I use it locally on my computer I get the height but when I use it on dreamhost I get nothing.

I do not have the GD library installed on my computer and it still works, is there something I need to do or maybe dreamhost has it setup differently than me.

Here is the code:

<?php // Get Image Height $image = "http://www.mididelight.com".$current_category["image"]; $imgprop = getimagesize($image); $height = $imgprop[1]; ?>
  • NOTE: the url is correct

#2

Your code is correct, but I think you are having a problem with the path. Try using a relative path to the image.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

you are correct, i made it a relative path and it works now. thanks for you quick reply.


#4

You are quite welcome. I imagine it may have something to do with URL file access being disabled with PHP5, which is actually a good thing.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]