Zend framework is a PHP framework. I have been in contact with PHP for a year. I have been in contact with Zend framework for about two months. the Getting Started is through Han shunping's video lecture on "Chuanzhi podcast". The Zend framework used is 1. version X. The latest version is Zend framework2.x. This article describes how to set 1.x.
1. Generate the Zend framework file directory. There are many methods: (1) ZF command, (2) Zend studio to generate a project, (3) directly copy the existing project directory. I usually use the method of copying existing directories.
The Zend directory structure is as follows:
2 (1) Use the VM method to modify the httpd. conf file, add the VM, and remove #
In the httpd-vhosts.conf file, set the VM
<Virtualhost *: 80>
DocumentRoot "/opt/lampp/htdocs/ABC/Public"
Servername abc.com
<Directory "/opt/lampp/htdocs/ABC/Public">
AllowOverride all
Directoryindex index. php
Allow from all
</Directory>
</Virtualhost
The publishing directory of the VM is set in the ABC/public directory, and the ABC directory is the Zend directory. Modify the local. host file and point the address of abc.com to the server.
The virtual host method is easy to set up, but to become a real system, you must have a domain name. The second method is to achieve direct access from an IP address without a domain name.
(2) In Apache, you can set a separate directory for the program, such as phpMyAdmin in the lampp environment, set in the/opt/lampp/etc/extra/httpd-xampp.conf File
If you set the publishing directory to a public directory,
<Directory "/opt/lampp/ABC/Public">
AllowOverride all
</Directory>
Access to the public directory can be accessed through IP/ABC, but the system will get the controller and action because of the "/ABC" directory structure error.
The correct method is to modify
DocumentRoot "/opt/lampp/ABC/Public"
<Directory "/opt/lampp/ABC/Public">
AllowOverride all
</Directory>
Modify the publishing path again, and then directly access the IP address, that is, Public/index. php. Other features such as XAMPP and phpMyAdmin are still available in the XAMPP system.