Home >Backend Development >PHP Problem >How to modify ini file path in php

How to modify ini file path in php

藏色散人
藏色散人Original
2021-09-25 09:30:093320browse

php method to modify the ini file path: 1. Find the "environment variable"; 2. Add a value "d:\www\php54"; 3. Create a new environment variable and set the "variable value" to "d:\www\php54"; 4. Restart the computer.

How to modify ini file path in php

##The operating environment of this article: Windows 7 system, PHP version 5.4, DELL G3 computer

phpHow to modify the ini file path?

How to modify the location of the php.ini file

Maybe you don’t want to copy the PHP.ini file to the windows folder of the system disk or you can’t use it after changing it. You want to change it but you can’t. Know how to change it. Then look at the following:

Let’s first talk about the order in which the windows system searches for files: the system will first search in the windows directory, windows\system32 directory, and then search in the directory specified by the environment variable PATH.

Tip: When naming the folder, it is best not to have spaces in the path to avoid problems.

Method to modify the location of php.ini:

Need to modify the windows environment variables:

1: Computer->Properties->Advanced System Settings->Environment Variables

2: Add a value d:\www\php54 to the system's PATH environment variable (separated from the previous value with a ; sign).

3: Create a new environment variable with "variable name" as "PHPRC" and "variable value" as d:\www\php54 (the directory where the php.ini file is located).

4: Restart the computer.

When printing php information in the browser, just look at the following:

##Configuration File (php.ini) Path d:\www\php54\php.ini## Recommended learning: "PHP Video Tutorial

The above is the detailed content of How to modify ini file path in 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