Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何知道使用 cURL 建立的连接是否超时(使用相对选项)或通常失败?我只能输出响应正文/标题,对吗?
您可以在 curl_exec 之后调用 curl_error 或 curl_errno。
http://www.php.net/manual/en/function.curl-error.php