try {
throw new Exception("Could not open the file!\n");
}catch (Exception $e) {
echo "(File: ".$e->getFile().", line ".$e->getLine()."): ".$e->getMessage();
return;
}
出错提示效果:
(File: D:\youkuupload\sample.php, line 31): Could not open the file!