: This article describes how to configure the ZendFrame development environment for php. For more information about PHP tutorials, see. My development environment is Ubuntu12
1, go to the official website to download ZendFrame development kit, the latest is: ZendFramework-1.12.15.tar.gz
After decompression, copy the zf. sh and zf. php files in the bin directory to the/usr/bin directory.
Sudo vim ~ /. Bashrc
Add the last line:
Alias zf =/usr/bin/zf. sh
Copy the zend file under the library Directory of zendframework-1.12.15.tar.gz to the/usr/share/php Directory. the default php path is/usr/share/php. configuration in the ini configuration file: include_path, which is set by the reader.
2. set up a virtual host environment
First, view your own IP address in ifconfig. if not, set a static IP address. ifconfig etho 192.168.88.153 broadcast 192.168.88.255 netmask 255.255.255.0 (my personal settings)
Vim/etc/hosts
Add: 192.168.88.153 haha.com (haha.com is the domain name accessed by the browser)
Ping haha.com to test whether all requests can be pinged.
Enable the mod_write module of Apache
Sudo a2enmod rewrite
Set the root directory and configuration information of the website
Vim/etc/apache2/sites-available/hahahacom
ServerName haha.com
DocumentRoot "/var/www/hahacom/public"
ErrorLog "/var/log/apache2/hahacom_errors.log"
CustomLog "/var/log/apache2/hahacom_access.log" common
The website root directory is/var/www/hahacom/
Switch the directory to/var/www
Run: zf create project hahacom will automatically generate the website directory content
Run tree-d hahacom
Hahacom
── Application
│ ── Configs
│ ── Controllers
│ ── Models
│ ── Views
│ ── Helpers
│ ── Scripts
│ ── Error
│ ── Index
── Docs
── Library
── Public
── Tests
── Application
│ ── Controllers
── Library
Enable VM
Sudo a2ensite hahacom
Restart Apache
Sudo/etc/init. d/apache2 restart
Access http://haha.com/indexin the browser.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above introduces the ZendFrame development environment for php configuration, including some content, and hopes to help friends who are interested in PHP tutorials.