<IfModule dir_module> DirectoryIndex index.html index.php </IfModule> LoadModule php_module "G:/lang/Apache/php/php8apache2_4.dll" AddHandler application/x-httpd-php .php # configure the path to php.ini PHPIniDir "G:/lang/Apache/php"
<?php phpinfo(); ?>and open http://localhost/info.php
command line, use G:\lang\Apache\php.exe
php -h = help php -i = info php -r "print_r(get_defined_constants());" php -r "print(phpversion());"Note: at Windows use double quote to wrap whole command and single quote for text inside