Forum Moderators: coopster & phranque

Message Too Old, No Replies

getimagesize() function error

         

shinyj

6:34 am on Sep 20, 2001 (gmt 0)



$size1 = getimagesize ($display_image);
echo "width1=".$size1(0)."<br>";
echo "height1=".$size1(1)."<br>";

I coded as above, but I got error like as follows Fatal error: Call to undefined function: array() in /home/memeland/manager/products/p_register.php on line 413
GD library installed on Linux Server.
I think the function can be used without any other setting before using it. Right?
Why undefined function error occured?
Please let me know why?

sugarkane

1:36 pm on Sep 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi shinyj, welcome to WebmasterWorld

I don't know about the GD side of it, but the undefined function error is probably caused by $size1(0) - arrays in PHP use [] rather than (), try rewriting it as $size1[0] and see if that helps.