【发布时间】:2012-01-02 12:36:36
【问题描述】:
我正在使用file_get_contents 从网上下载一个文件。
有时我会收到 503 Service Unavailable 或 404 Not Found。
警告:file_get_contents(http://somewhereoverinternets.com) [function.file-get-contents]:无法打开流:HTTP 请求 失败的! HTTP/1.0 503 Service Unavailable in somesourcefile.php 在线 20
我怎样才能得到这个错误代码 - 503 ? 404、200? 为这些情况制定流程。
【问题讨论】:
标签: http header http-status-code-404 file-get-contents