【发布时间】:2011-11-08 20:07:10
【问题描述】:
我有课并这样做:
function __destruct() {
$this->load_file('epicEndingfile.php');
}
我得到一个错误:
Warning: require(...) [function.require]: failed to open stream: No such file or directory
当我对__construct 执行相同操作时,它会起作用。这是为什么呢?
编辑:我实际上不需要文件,但我使用方法来做到这一点。
【问题讨论】:
-
你的 get_include_path 返回什么?当您需要文件时,我建议使用像 /path/to/files/ 这样的完整路径。
标签: php oop destructor