<?php
function getTitle($Url){
$str = file_get_contents($Url);
if(strlen($str)>0){
preg_match("/\<title\>(.*)\<\/title\>/",$str,$title);
return $title[1];
}
}
echo getTitle("http://www.stackoverflow.com/");
?>
当我运行此脚本时,它返回错误
max_execution_time exceeds 30 second.
我不想增加 max_execution_time 但我想减少脚本运行时间。