刚从aspx转过来,还是总爱用那个思想考虑问题...
具体到这个问题,我的代码:
try
{
preg_match_all($pattern,$string,$all);
}
catch (Exception $ex)
{
echo $ex->getTraceAsString();
}
我是想如果有异常,就显示一下忽略掉,但还是显示出来警告,为什么呢···警告如下
Warning: preg_match_all() [function.preg-match-all]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in F:\php\doom\newfile.php on line 52
Warning: preg_match_all() [function.preg-match-all]: Empty regular expression in F:\php\doom\newfile.php on line 52