Strange Issue with PHP's fopen, "Numerical result out of range"
I'm trying to open a file开发者_JS百科 using fopen, and I am getting the error:
Warning: fopen(/var/www/views/images/favicon.gif): failed to open stream:
Numerical result out of range
The file exists at the provided path. I couldn't find any documentation on the error to fix it. Any thoughts?
Can you access the file directly? What kind of information does getimagesize()
return on the file? It seems really odd and I'm having no luck getting that result.
Turns out I was trying to use
fopen($file, FOPEN_READ)
When all I had to do was change it to:
fopen($file, 'r')
And that fixed it.
精彩评论