<?php
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 1 //设置一个超时时间,单位为秒
)
)
);
file_get_contents("https://example.com/", 0, $ctx);
?>
<?php
$ctx = stream_conte<?php
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 1 //设置一个超时时间,单位为秒
)
)
);
file_get_contents("https://example.com/", 0, $ctx);
?>
<?php
$ctx = stream_conte