PHP path --- 1 --- Wamp environment configuration -- php environment configuration, --- 1 --- wamp -- php

Source: Internet
Author: User
Tags echo date php development environment

PHP path --- 1 --- Wamp environment configuration -- php environment configuration, --- 1 --- wamp -- php

It has been more than half a year since I wanted to learn PHP by myself. Recently, I felt like I was stuck somewhere, and it was difficult to go back to Qingtian (just kidding me ).

The reason is as follows: 1. You may have no system plans for learning PHP. 2. Lack of development experience (PS: although it is helping others maintain small information websites, improve small functions or something, and a corporate website that is being developed now ). 3. It depends on the Framework thinkPHP. 4. I have never started books, so I am too dependent on Video watching.

There is also a simple personal idea: php is too simple to get started, and simple web basically does not need any advanced skills, it may also lead to low learning efficiency. In addition, it seems that php must be bound to other things, rather than simply languages, especially MySQL. For example, php's advanced part is data knowledge, rather than php's own syntax knowledge, in addition, most php knowledge is applied to functions, and there is little logical structure of algorithms. Of course, I don't know if the expression is correct.

《《《《《《《《《《《《《《

Tip: I recommend an integrated environment such as wamp sever or appserv for the first time when I am a newbie.

Then: detailed tutorial http://blog.csdn.net/yousuosi/article/details/9448903

The following is the boring time. We suggest you take a detailed tutorial.

Installation sequence: Apache> MySQL> PHP

"Install Apache, just follow the process

Apache> http: // when you see it's work on localhost, the installation is successful.

"Install MySQL and follow the process.

MySQL> cmd> mysql-u root-p

Install php and decompress it.

Add the php module to Apache> modify the Apache configuration file httpd. conf> Add the LoadModule php5_module "d:/Server/php/php5apache2_2.dll" to the last line"

"" Add. php to the Apache resolvable file type-> modify the Apache configuration file httpd. conf-> Add AddType application/x-httpd-php. php In the last line

> Add the default access page-> modify the Apache configuration file httpd. conf-> modify (add to <Directory/> if not) DirectoryIndex index. php index.html

> D:/server/php. copy the ini-developmentt file and rename it to php. ini-> modify the Apache configuration file httpd. conf-> Add PHPIniDir "d:/Server/php"

"Modify the php extension library path-> modify php. ini-> extension_dir =" d:/Server/php/ext"

> Add the php extension library-> modify php. ini-> extension = php_mysql.dll, and divide it before removing it (What should I do with the semicolon)

"Restart Apache-MySQL

 


How to configure the php development environment?

WAMP Environment

Apache, mysql, and php (WAMP is mainly used for testing. apache server software, mysql database, and php are installed on the local machine)

Or directly install integrated software.
 
How to configure the PHP environment in Windows

Download PHP5: cn2.php.net/..32.zip
Download apache: down.chinaz.com/soft/18000.htm

I. Install and debug php
Because php is a zip file (not an install version), it is easy to install. just decompress it. Rename the decompressed php5.2.1-Win32 to php5. And copy it to the C directory. The installation path is c: \ php5.
1. Find the php. ini-dist or php. ini. recommended file in the php Directory and rename it php. ini.
And copy it to the windows directory of the system disk (take c: \ windows as an example ).
2. Copy php5ts. dll and libmysql. dll under the php Directory to the c: \ windows \ system32 directory.
3. Copy the php_gd2.dll, php_mysql.dll, and php_mbstring.dll files in the php5 \ ext directory to the c: \ windows \ system32 directory.
If php_gd2.dll php is not loaded, the image cannot be processed. Mysql function libraries are not supported when php_mysql.dll php is not loaded.
Php_mbstring.dll supports wide characters when phpmyadmin is followed.
4 open the c: \ windows \ php. ini file (associated with mysql)
Set extension path
Find the line extension_dir with extension_dir = "./"
Change this row
Extension_dir = "C: \ php5 \ ext"
C: \ php5 is the path for installing php. Dll cannot be loaded if the path is incorrect.
(Note: Some php versions are; extension_dir = "./" Remove the semicolon from the previous version)
Search for extension
Extension = php_mbstring.dll
Extension = php_gd2.dll
Extension = php_mysql.dl
Remove the semicolon before the preceding three items so that these dll files can be loaded at apache startup.
Of course, we copied these dll files to system32
Php5 Time Difference
<? Php echo date ("Y-m-d H: I: s");?> Time Difference: eight hours
Why? The Time Zone settings are added for the PHP5 series. The default value is Greenwich Mean Time, which is 8 hours different from the East 8 zone in China.
Find the row in date. timezone
; Date. timezone =
Replace;
Date. timezone = PRC
Ii. apache debugging and integration
1. Modify the website root directory
Find that DocumentRoot has such a line
DocumentRoot "C:/Program Files/Apache ...... the remaining full text>

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.