使用 Zend Mail Pop3 作为模块
我想使用 Zend Framework 的 Mail 模块。我已将所有 Zend lib 提取到项目 lib 文件夹中。
那么如何加载邮件模块以使用此模块: http: //framework.zend.com/manual/1.0/en/zend.mail.read.html?
我已经尝试过:
include("lib/Zend/Loader.php");
Zend_Loader::loadClass('Mail');
$mail = new Zend_Mail_Storage_Pop3(array('host' => 'xxxxx',
'user' => 'xxxxx',
'password' => 'xxxxx'));
我的项目结构是这样的:
-project->lib->Zend->All the Zend lib files
-projects/index.php
例如:
Warning: require_once(Zend/Mail/Transport/Abstract.php) [function.require-once]: failed to open stream: No such file or directory
我真的必须手动修改所有 require_once
吗?
但我返回了有关其他模块文件中包含路径的错误。
多谢。
I would like to use the Mail module of Zend Framework. I have extracted all the Zend lib in my project lib folder.
So how can I load the Mail module for using this module: http://framework.zend.com/manual/1.0/en/zend.mail.read.html?
I have tried this:
include("lib/Zend/Loader.php");
Zend_Loader::loadClass('Mail');
$mail = new Zend_Mail_Storage_Pop3(array('host' => 'xxxxx',
'user' => 'xxxxx',
'password' => 'xxxxx'));
My project structure is this:
-project->lib->Zend->All the Zend lib files
-projects/index.php
For example:
Warning: require_once(Zend/Mail/Transport/Abstract.php) [function.require-once]: failed to open stream: No such file or directory
Do I really have to modify all the require_once
manually?
But I have returned errors about include path in others module files.
Thanks a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
查看自动加载器参考:
如果您想编写自定义自动加载器,请使用
和php的
__autoload
函数。您还可以将库的路径添加到include_path
(请参阅set_include_path
/get_include_path
),例如
Try:
See the autoloader reference:
and php's
__autoload
function if you want to write custom autoloader.You may also add the paths with the libraries to the
include_path
(seeset_include_path
/get_include_path
)e.g.