![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
[php]
<?php
try {
$error = 'Always throw this error';
throw new Exception($error);
// 从这里开始,tra 代码块内的代码将不会被执行
echo 'Never executed';
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
// 继续执行
echo 'Hello World';
?>
[/php]
为什么我运行这么简单的程序都会出错呢,谁遇到过?怎么解决.
错误信息:
| QUOTE: |
| Fatal error: Uncaught exception 'Exception' with message 'Always throw this error' in /server/website/Framework/web/home/index.php:4 Stack trace: #0 {main} thrown in /server/website/Framework/web/home/index.php on line 4 |
环境:
FreeBSD6.2 + APACHE2.2 + PHP5.2
提问者:km3945 08-22 15:03
答复

