Home >Backend Development >PHP Problem >How to set environment variables in win7 php

How to set environment variables in win7 php

藏色散人
藏色散人Original
2020-10-07 00:08:513785browse

Win7 PHP environment variable setting method: first download the package; then find "php.ini-development" and modify it to "php.ini"; finally add PHP environment variables in the "Environment Variables" of win7 That’s it.

How to set environment variables in win7 php

Recommended: "PHP Video Tutorial"

1: Download the program package

First go to the php official website to download the program package, the official website address: http://www.php.net/downloads.php

2: Unzip

Unzip Put your program package in a directory other than the c drive (the folder is not named in Chinese)

3: Modify the php installation package file

In the php root directory Find "php.ini-development" and modify it to: "php.ini"

Find in php.ini (the following is not set by yourself)

Find the following statements and change these statements Remove the ";" in front:

The code is as follows:

;extension=php_gd2.dll
;extension=php_mysql.dll
;extension=php_sockets.dll

Find the following two sentences:

The code is as follows:

;On windows:
;extension_dir = "ext"

Change the last sentence above to (note removing the semicolon in front):

The code is as follows:

extension_dir = "D:\php-5.5.7\ext" //你存放php的目录

Four: Add bad Environment variables

The environment variable settings managed by win7 are similar to those of xp. Right-click [Computer]--[Properties]--[Advanced System Settings] and then select [Advanced]--[ Environment variables】

5: Detect php version number

The above is the detailed content of How to set environment variables in win7 php. For more information, please follow other related articles on the PHP Chinese website!

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