Configure ZendFrame development environment in php

Source: Internet
Author: User
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.