Excuse me, there is a line of code to set the php.ini file in the apache configuration file, as shown below. Why can it run without removing the "#" sign in front of PHPIniDir? I installed this using wamp, and then I watched the video on configuring apache separately. It said that the "#" must be removed.
Here is the loading path of the PHP configuration file specified by APACHE. If commented out, PHP will load the configuration file in the following order.
PHPIniDir (Apache 2 module only)
Registry key: HKEY_LOCAL_MACHINE—SOFTWARE—PHPIniFilePath
Environment variable:%PHPRC%
PHP5 directory (for CLI), or web server directory (for SAPI modules)
Windows directory (C:windows or C:winnt)
So if it is Apache + PHP5, you can use PHPIniDir to specify the path to the php5 configuration file php.ini.