問題描述
如何在不安裝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.
這篇關于如何在不安裝 Zend Framework 的情況下使用 Zend 庫的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!