运维网's Archiver
论坛
›
php
› PHP的file_get_contents设置超时
kaola4549
发表于 2018-12-23 14:17:33
PHP的file_get_contents设置超时
$context = stream_context_create(
array(
'http' => array(
'timeout' => 5,
)
)
);
file_get_contents("http://lyxint.com/", 0, $context);
页:
[1]
查看完整版本:
PHP的file_get_contents设置超时