Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getimagesize()

Status
Not open for further replies.

dagger2002

Programmer
Nov 23, 2004
172
US
Hey all I have a hopefully quick question.

I have a site that I am building. I have a right bar that is pulling from a mysql db, version 4, and php, version 4.

I am using the getimagesize() command on a path from the db. But I am getting the following error

Code:
Fatal error: Only variables can be passed by reference in /home/globalai/public_html/dev/current/includes/right.php on line 82

here is line 82

Code:
$path = $website . substr($row2[pic_path], 27, 100);
$size = getimagesize($path, 3);

$website is just the url to the public directory.

Any Ideas?

Thanks All
 
the problem is that you are using the getImageSize function incorrectly.

the php manual gives a description of the function parameters as follows:

array getimagesize ( string $filename [, array &$imageinfo] )
this means that if you want the imageinformation you must pass a variable as the second argument. the integer "3" cannot be used as a variable. If you do not need the extended information, just pass the filename.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top