[Solar-talk] use getimagesize() in a view

Jeff Surgeson solar at 3hex.com
Mon May 12 10:22:55 CDT 2008


How do I get php's getimagesize() to find a public image file?

I assumed that passing it a path same as I would if I used a Solar image 
helper as in: 

echo $this->image('path/to/image.jpg'); it finds this!
$image_info = getimagesize('path/to/image.jpg'); not this!

If I put image.jpg in my document root then getimagesize() finds it, so I am 
calling the function ok it just cant find the file. I assume this has to do 
with public paths symbolic links etc. I have my directory layout and symbolic 
links done as per standard (/source /include /config etc) which work fine for 
all else.

Do I need to construct a path using Solar_Uri? is so how do I go about it, 
sorry for missing something which is probably so obvious.

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the Solar-talk mailing list