【发布时间】:2014-01-02 21:15:37
【问题描述】:
我在 Mac OSx 上遇到异常错误
[Sun Dec 15 18:13:10 2013] [error] [client 127.0.0.1] PHP Fatal error: Class 'PEAR_Exception' not found in /path/file.php on line 102
我确定我安装了扩展“Pear”。 (只是在终端上运行“pear”不会出现“command not found”错误)
是什么导致了这个错误?
【问题讨论】:
-
你的 PHP 中有 PEAR
include_path? -
对不起,我是 php 新手,如何检查?
-
执行
<?php phpinfo();并寻找include_path。 -
是的,它在
include_path下。 -
您是否在调用它的文件中包含了
PEAR_Exception类?像这样require_once 'PEAR/Exception.php';?