Jump to content


ImageCreateFromJpeg ...

  • Please log in to reply
1 reply to this topic

#1 physh

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 22 June 2006 - 03:45 PM

Hello. I was wondering if anyone could please help me solve this problem. when i have move one site to a new server this piece of code stopped working. The wierdest part is that in firefox it lets me download a blank php file instead of executing it.

$topimg = "./i/tops/demo.jpg";
$img=ImageCreateFromJpeg($topimg);// this line casues the problem
$rgb = ImageColorAt($img, 1, 1);
echo '<html><head></head><body bgcolor="#'.dechex($rgb).'"><img src="'.$topimg.'" border=0></body></html>';

at first i thought that GD was not installed bu thats not the case:
["GD Version"]=>"bundled (2.0.23 compatible)"
  ["FreeType Support"]=> bool(true)
  ["JPG Support"]=> bool(true)

#2 Kris

  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 22 June 2006 - 06:46 PM

Have you tried assigning an absolute path to $topimg instead of a relative one?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users