PHP development environment configuration WAMP + ZendFramework1. download WAMPhttp: // development. PHP development environment configuration
WAMP + ZendFramework
1. download WAMP
Http://downloads.sourceforge.net/project/wampserver/WampServer%202/WampServer%202.0/WampServer2.0i.exe? Percent % 2 Fdownload & ts = 1292142301 & use_mirror = nchc
2. download ZendFramework
Http://framework.zend.com/releases/ZendFramework-1.11.1/ZendFramework-1.11.1.zip
3. configure the environment variable PATH
E: \ wamp \ bin \ php \ php5.3.0; E: \ wamp \ bin \ mysql \ mysql5.1.36 \ bin
4. configure Apache httpd. conf
E: \ wamp \ bin \ apache \ Apache2.2.11 \ conf \ httpd. conf
# LoadModule rewrite_module modules/mod_rewrite.so
To:
LoadModule rewrite_module modules/mod_rewrite.so
5. configure ZendFramework
Create directory E: \ wamp \ bin \ php \ php5.3.0 \ Zend
Copy the bin under the ZendFramework installation directory, library \ Zend to the Zend directory of E: \ wamp \ bin \ php \ php5.3.0.
6. configure PHP php. ini
E: \ wamp \ bin \ php \ php5.3.0 \ php. ini
; Include_path = ".; c: \ php \ Des; e: \ wamp \ bin \ php \ php5.3.0 \ PEAR; e: \ wamp \ bin \ php \ php5.3.0 \ Zend"
To:
Export de_path = ".; c: \ php \ shortdes; e: \ wamp \ bin \ php \ php5.3.0 \ PEAR; e: \ wamp \ bin \ php \ php5.3.0 \ Zend"
Short_open_tag = Off
To:
Short_open_tag = On
7. modify the default password of the MYSQL administrator
Grant all privileges on *. * TO 'root' @ '%' identified by 'root' with grant option;
Flush privileges;
8. modify the PHPADMIN password
E: \ wamp \ apps \ phpmyadmin3.2.0.1 \ config. inc. php
$ Cfg ['servers'] [$ I] ['password'] = '';
To:
$ Cfg ['servers'] [$ I] ['password'] = 'root ';
9. test connection to MYSQL
9.1 mysql-h localhost-u root
Password: root
9.2 create a database
Create database tl;
Use tl;
9.3 insert test data
Create table personal_info (
Pi_id bigint (20) not null auto_increment,
Pi_name varchar (50) not null,
Pi_tel varchar (15) default NULL,
Pi_qq varchar (15) default NULL,
Pi_email varchar (50) default NULL,
Primary key (pi_id)
) ENGINE = MyISAM default charset = utf8 AUTO_INCREMENT = 4;
Insert into personal_info values (1, 'hangsan ', '20160301', '20160301', 'hangsan @ 126.com ');
Insert into personal_info values (2, 'lisi', '000000', '000000', 'lisi @ 163.com ');
Insert into personal_info values (3, 'hangww', '000000', '000000', 'hangwu @ sohu.com ');
Commit;
9.4 Create a PHP application directory
9.4.1 create directory E: \ wamp \ apps \ tl
9.4.2 configure application directory permissions
E: \ wamp \ alias \ tl. conf
Alias/tl "E:/wamp/apps/tl /"
# To give access to tl from outside
# Replace the lines
#
# Order Deny, Allow
# Deny from all
# Allow from 127.0.0.1
#
#
#
# Order Allow, Deny
# Allow from all
#
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny, Allow
Allow from all
9.5 test page
E: \ wamp \ apps \ tl \ index. php
9.6 test database connection page
E: \ wamp \ apps \ tl \ connsql. php
'; // Display the field name echo "\ n\ N "; for ($ I = 0; $ I
'. Mysql_field_name ($ result, $ I); echo"\ N ";} echo"\ N "; // locate the first record mysql_data_seek ($ result, 0); // Retrieve record cyclically while ($ row = mysql_fetch_row ($ result) {echo"\ N "; for ($ I = 0; $ I
'; Echo "$ row [$ I]"; echo'';} Echo"\ N ";} echo"\ N "; echo" "; // release the resource mysql_free_result ($ result); // close the connection mysql_close ($ conn);?>
9.7 start all services
Start the WAMP management tool, start all services, and switch the services to the online status.
9.8 test page effect
Http: // localhost/tl/connsql. php
10. complete.