PHP getimagesize with ampersand in string creates errors
Posted
by RobHardgood
on Stack Overflow
See other posts from Stack Overflow
or by RobHardgood
Published on 2010-03-12T03:50:25Z
Indexed on
2010/03/12
3:57 UTC
Read the original article
Hit count: 311
I'm using the getimagesize function in PHP, and the path string contains an ampersand, which otherwise is fine. The page gives me errors where getimagesize() is called. Looking at the source code, though, I see the ampersand is being passed through as & rather than just & I presume this is causing errors because PHP doesn't need to convert it to the html tag in order to find the path, right?
Here is the error:
Warning: getimagesize(image.php?name=username&pic=picture) [function.getimagesize]: failed to open stream: No such file or directory
© Stack Overflow or respective owner