Home > Backend Development > PHP Tutorial > CURL ,求大侠。解决方案

CURL ,求大侠。解决方案

WBOY
Release: 2016-06-13 10:10:35
Original
869 people have browsed it

CURL ,求大侠。
最近用curl获取文件,有时候超时。哪位大侠知道怎么用try来捕捉curl的超时异常呢?求大侠解答。

------解决方案--------------------
通过if( $curl_code == 200 ) { 来判断是否正常访问.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template