fopen issue [SOLVED]
Posted: Mon Dec 26, 2005 11:12 am
Hey there,
I was wondering if anyone knows how to workaround an fopen issue I've been having. Users on my website can link to photos, and if the photo isn't there then of course I get an fopen message: fopen(http://www.spendthriftfarm.com/Photos/m ... -brown.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404
that everyone sees. Is there any good way to check if the photo is there before I call fopen so I don't have this issue? I've tried things like this but nothing seems to be working
I was wondering if anyone knows how to workaround an fopen issue I've been having. Users on my website can link to photos, and if the photo isn't there then of course I get an fopen message: fopen(http://www.spendthriftfarm.com/Photos/m ... -brown.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404
that everyone sees. Is there any good way to check if the photo is there before I call fopen so I don't have this issue? I've tried things like this but nothing seems to be working
Code: Select all
$fp = fopen($file, 'r');
if ($fp)
;//display photo
else
; //photo not found