How to modify the configuration path of php.ini

藏色散人
Release: 2023-03-02 09:00:02
Original
3509 people have browsed it

How to modify the path of php.ini: First click "Computer->Properties->Advanced System Settings->Environment Variables"; then create a new environment variable PHPRC; finally restart phpserver and you will see "php .ini" changes.

How to modify the configuration path of php.ini

Modify the configuration path of php.ini under win7

By directly decompressing the downloaded zip package under win7 PHP is installed. At this time, the installation path and configuration file path of PHP are not set in the environment variables. The default loading path of the configuration file is the C:\Windows directory. At this time, there is no configuration file, so there is no configuration file. At this time There is no way to configure php. You need to manually move the php.ini file to the C:\Windows directory.

If you don’t want to move it to the C:\Windows directory, here is another way to set the path of php.ini to the php installation path and add environment variables.

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

Create a new environment variable PHPRC, pointing to the PHP installation path. As shown in the picture below, my php was decompressed to the D drive, so the environment variable is D:\php5.

How to modify the configuration path of php.ini

After this setting is completed, you can restart phpserver (apache2, etc.). You can see that the loading path of php.ini changes, and the configuration of php.ini also takes effect.

How to modify the configuration path of php.ini

The php.ini configuration file does not exist in the php installation directory by default. You need to change php.ini-development to php.ini.

For more related knowledge, please visit PHP Chinese website!

The above is the detailed content of How to modify the configuration path of php.ini. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!