Hi,
    Today i started working on WAMP so that i can work with PHP on Windows
also. While checking it's functionality i wrote few lines of code but found
an unexpected error even according to me code is absolutely correct. Here it
is:


<?php
$image = imagecreate(400,300);
$gold = imagecolorallocate($image,255,240,0);
$white = imagecolorallocate($image,255,255,255);
$color=$white;
for($i=400,$j=300;$i>0;$i=$i-4,$j=$j-3)
        {
         if($color==$white)
                          {
                           $color=$gold;
                          }
         else
                         {
                          $color=$white;
                         }
imagefilledrectangle($image,400-$i,300-$j,$i,$j,$color);
        }
imagejpeg($image);
imagedestroy($image);
?>


*The error i found was :*
                          *Fatal error*: Call to undefined function
imagecreate() in *C:\wamp\www\myphp\image1.php* on line *2*

After that
1: I checked the php.ini file also and everything according to me is right.
2: Tried to run the same code on Linux but on Linix
*imagejpeg($image);*line was not working. I used the same
function(imagejpeg();) in other
program on Linux and it was working properly.
        Please help me to get rid of this problem. I am unable to understand
the problem.
-- 
Regards
RAKESH
"The true sense of knowledge is not intelligence, but the imagination"
_______________________________________________
Ilugd mailing list
[email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to