How to figure out the path of the PHP configuration file php. ini

Source: Internet
Author: User
This article mainly introduces how to figure out the PHP configuration file php. the ini path method is to use the phpinfo () function to output PHP information, and then find the ConfigurationFile (php. ini) This section of Path is enough. if you need it, you can refer to it recently. under which directory does ini exist? Or why does the modification take effect after php. ini? Based on the above two questions, I think it is necessary to teach the bloggers who are new to PHP how to find the path directory for PHP to call php. ini.

Generally, PHP is installed on two platforms: Linux and Windows. Windows platforms are mostly used, because the current installation packages are very convenient, such as appserv and wamp. Linux also has an LNMP one-key installation package, which is very convenient. Since these installations are simplified, it is naturally difficult for many bloggers to understand php after the environment has been installed. directory in which ini is stored, or php is found in a directory. the INI file, but I don't know whether it is the one called by the PHP program.

We can use phpinfo to find the php. ini path.
Create a php page and enter:
[Code]
<? Php phpinfo ();?>
[Code]

Save and exit

Access the page using a browser and you will see a PHP configuration page.

Find the Configuration File (php. ini) Path line.

The value on the right/usr/local/webserver/php/etc is the directory where the php. ini file is located.
After the last modification, remember to restart the relevant program to take effect.

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.