【发布时间】:2010-07-18 18:42:00
【问题描述】:
我有几个文件如下:
index.php:
require_once("foo.php");
require_once("bar.php");
foo.php:
class foo {
function1() {
}
}
bar.php:
class bar {
?????
}
我的问题是,有没有办法从 bar 类中的 foo 类访问 function1,而不必在 bar.php 文件中包含 foo.php 文件,因为它已经加载到 index.php 中?
提前致谢
【问题讨论】:
-
访问方式。静态的?还是访问该类的对象?