Home  >  Article  >  Backend Development  >  Configuring ZendFrame development environment in php

Configuring ZendFrame development environment in php

WBOY
WBOYOriginal
2016-07-30 13:29:548043browse

My development environment is Ubuntu12

1. Go to the official website to download the ZendFrame development package. The latest one is: ZendFramework-1.12.15.tar.gz

After unzipping, copy the zf.sh and zf.php files in the bin directory Go to the /usr/bin directory

sudo vim ~/.bashrc

Add the last line:

alias zf=/usr/bin/zf.sh

Put the library of the ZendFramework-1.12.15.tar.gz compressed package Copy the zend file in the directory to the /usr/share/php directory. My default path for php is /usr/share/php. This can be configured in the php.ini configuration file: include_path. The reader can set it by himself. 2. Settings A virtual host environment

First ifconfig checks your own IP address. If it is not set, set a static IP by yourself,

ifconfig etho 192.168.88.153

broadcast 192.168.88.255 netmask 255.255.255.0 (my personal setting)

vim /etc/hosts

Add: 192.168.88.153 haha.com (haha.com is the domain name accessed by the browser)

ping haha.com Test whether you can ping haha.com Open Apache's mod_write module through

vim /ETC/Apache2/SITES-AVAILABLE/Hahacom

& LT; VirtualHost 192.168.88.153:80>

Documentroot "/VAR/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


Execute: zf create project hahacom will automatically generate the website directory content

Execute tree -d hahacom

hahacom

├── application│ ├ ── configs│ ├── controllers

│ ├── models

│ └── views│ ├── helpers│ └── scripts

│ └── ├── error

│ └── index├── docs ├── library

├── public

└── tests │ └── controllers └── library



Open the virtual host
sudo a2ensite hahacom





Restart Apache





sudo /etc/init.d/apache2 restart

Open the browser and visit: http://haha.com/index, the following picture will be displayed

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the configuration of ZendFrame development environment in PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn