我正在尝试将Amazon实现到我的Zend1项目中,但它似乎无法加载这些类。
我已经将这个库放到了library/Eplan/AmazonCloudSearch中,经过调查,为了能够加载命名空间,我需要从Zend_Loader_Autoloader::getInstance()调用registerNamespace方法,所以我把它放在了自动加载器的顶部(我还试图将它放在引导程序中,而没有成功):
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace("Aws");AWS库的名称空间如下所示:Aws\namespace
我所犯的错误就像Warning: include_once(Aws/Common/Aws.php): failed to open stream: No such file or directory in /srv/www_nfs_desarrollo/vhosts/desarrollo.techmaker.net/httpdocs/library/Zend/Loader.php on line 134
Autoloader完整代码:http://pastebin.com/gS9mcntK
我一整天都在绞尽脑汁想办法解决这个问题,有什么办法吗?
发布于 2015-06-25 09:50:43
您可以使用以下代码使用您的application.ini文件自动加载。
autoloaderNamespaces[] = "Aws"
https://stackoverflow.com/questions/30352814
复制相似问题