如何在PHP中更改php.ini的默认路径?

When I see phpinfo(), it shows the path of php.ini file as: \apache2.2.22\bin\php.ini

But I want to load php.ini file from PHP executable folder. I tried to modify it from regedit but PHP is not available in regedit!

I am trying to create the php extension in c++ where I want to create extension for introduction.dll file. I copied this dll file in php/ext folder and set all the parameters in php.ini

But later I found that php.ini file loaded using phpinfo() was from apache! Any idea?

Referring to http://php.net/manual/en/install.windows.apache2.php you can specify a "PHPIniDir" directive in your apache configuration (at least if you run it as a module).