如何在不安装 Zend Framework 的情况下使用 Zend 库

2021-12-29 00:00:00 php zend-framework zend-mail

如何在不安装zend框架的情况下使用zend库?

How to use zend library without using zend framework installation?

我正在尝试在没有安装 zend 框架的情况下使用 zend 库(邮件和 Mime),它没有返回任何错误消息......但是对于我的项目,我仅使用 Mail 和 Mime 库,如何在不安装 zend 框架的情况下使用 Zend 库..

I am trying to use zend library(Mail and Mime) without zend framework installation, its not returning any error messages... but for my project i'm using Mail and Mime library only, How to use Zend Library without installing zend framework ..

谢谢,维诺斯S

推荐答案

下载 Zend Framework 并将其放入 PHP 可访问的文件夹中.然后要么做

Download Zend Framework and put it into a folder accessible by your PHP. Then either do

include '/path/to/folder/containing/Zend/lib/Zend/Mail.php';
include '/path/to/folder/containing/Zend/lib/Zend/Mime.php';

$mailer = new Zend_Mail;

或者 - 更好更方便 - 设置您的自动加载器和/或包含路径,以便 PHP 可以找到直接使用类,而不必包含它们.

Or - better and more conventient - setup your autoloader and/or include path so PHP can find the classes directly, without you having to include them.

另见

  • 要求附录,了解 Zend Framework 的详细要求列表.
  • the requirements appendix for a detailed list of requirements for Zend Framework.

相关文章