function wp_file_get_contents($url, $timeout = 30) { $context = stream_context_create(array( 'http' => array( 'timeout' => $timeout // 超时时间,单位为秒 ) )); return file_get_contents($url, false, $context); }