I am trying to configure PHP with apache 2.4 and everytime I run the localhost/phpinfo.php, it shows me the code.
browser used: chrome changes in apache server httpd conf file: LoadModule php7_module "C:/php/php7apache2_4.dll" AddHandler application/x-httpd-php .php PHPIniDir "c:/php"
phpinfo file:
<?php phpinfo(); ?>
tried almost all the answers but everytime it is showing me this file content only when running localhost/phpinfo.php
Note: localhost is running fine.
This question has been asked and answered many times. There are many potential answers depending on where you got Apache and PHP from.
If you can't troubleshoot, just download XAMPP: https://www.apachefriends.org/index.html
For troubleshooting see: PHP code is not being executed, instead code shows on the page