By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,023 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,023 IT Pros & Developers. It's quick & easy.

Help with trapping a file error: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Foundin

P: n/a
php newbie needs help

Warning: file(http://shop1.outpost.com/product/5053975)
[function.file]: failed to open stream: HTTP request failed! HTTP/1.1
404 Not Foundin

I am just trying to put some code around this to trap it.

Nov 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

ca***********@gmail.com wrote:
php newbie needs help

Warning: file(http://shop1.outpost.com/product/5053975)
[function.file]: failed to open stream: HTTP request failed! HTTP/1.1
404 Not Foundin

I am just trying to put some code around this to trap it.
if(@file('http://shop1.outpost.com/product/5053975') == false) {
//file could not be opened
}
else {
//everything was fine
}

Nov 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.