phpcurltimeout有两种设置方式:毫秒和秒。curl普通二级超时:$ch=curluinit()curlusetopt($ch,curloptuuurl,$url)curlsetopt($ch,curloptuureturntransfer,1)curlsetopt($ch,curloptutime,60)//只需设置curlsetopt($ch,curlopthttpheader,$headers)curlsetopt($ch,curloptuseragent,$definedvars[”httpuseruu普通二级超时:curlsetopt($ch,curloptutimeout,60)curl如果需要毫秒超时,请添加:curleasysetopt(curl,curloptnosignal,1l)//或curlusetopt($ch,curloptunosignal,true)//支持毫秒级超时设置