【发布时间】:2017-04-27 04:33:28
【问题描述】:
如何在 php.ini 中从不同的命名空间调用类的公共静态函数。我有这个代码:
namespace x\y\z;
use x\y\z\h\Foo;
...
$classinstring = 'Foo';
$classinstring::getType();
我得到错误,php 找不到类 Foo Fatal error: Uncaught Error: Class 'Foo' not found 我该怎么做?
【问题讨论】: