简体   繁体   English

在xampp上安装zend框架

[英]Install zend framework on xampp

I have created virtual host using hosts file: 我已经使用hosts文件创建了虚拟主机:

127.0.0.1       zend.local

httpd-vhosts.conf 的httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot "D:/xampp/htdocs"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "D:/xampp/htdocs/zendtest/public"
    ServerName zend.local
</VirtualHost>

I am getting this warnings and error in xampp 我在xampp中收到此警告和错误

Warning: require_once(Zend/Application.php): failed to open stream: No such file or directory in D:\xampp\htdocs\zendtest\public\index.php on line 17

Fatal error: require_once(): Failed opening required 'Zend/Application.php' (include_path='D:\xampp\htdocs\zendtest\library;.;D:\xampp\php\PEAR') in D:\xampp\htdocs\zendtest\public\index.php on line 17

I think your ZF library is not inside the 2 include paths. 我认为您的ZF库不在2个包含路径中。 It may be inside D:\\xampp\\php\\ . 它可能在D:\\ xampp \\ php \\内部。 Just look for a folder named Zend. 只是寻找一个名为Zend的文件夹。 In that case you have to add D:\\xampp\\php to your include paths which you can do in php.ini file or index.php inside public folder of your project. 在这种情况下,您必须将D:\\ xampp \\ php添加到您的包含路径中,您可以在项目的公共文件夹内的php.ini文件或index.php中执行此操作。 In case you cannot find Zend folder, you can always download it and save inside library folder in your project (just outside public). 如果找不到Zend文件夹,则可以始终将其下载并保存在项目的库文件夹中(仅在公共外部)。

Side note: I usually ignore Zend folder from my version control if it is in project. 旁注:如果项目中有Zend文件夹,我通常会从其版本控制中忽略它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM