+ 2

Processing PHP in html-files using xampp

Hi there, anyone got any tips for me on how to get xampp (win10) to execute PHP-code inside a html-file? The file is located in the “htdocs”-folder. Files saved with the extension .php are executed. Grateful for any suggestions.

27th Mar 2019, 5:28 PM
Hasan Oktay
4 odpowiedzi
+ 5
Your html-files need also a .php extension. You just write your php code inside of <?php ... ?>. You can also include php files in here. Just rename index.html to index.php
27th Mar 2019, 5:55 PM
SouthPoleHillbilly
SouthPoleHillbilly - avatar
27th Mar 2019, 5:56 PM
SouthPoleHillbilly
SouthPoleHillbilly - avatar
+ 2
"Clowns.." is a quote from Simpsons😂😂
27th Mar 2019, 6:35 PM
SouthPoleHillbilly
SouthPoleHillbilly - avatar
+ 1
Thank you very much, although I do not at all agree that clowns are funny. Was hoping to keep the extension so VSC would keep highlighting the html-syntax.
27th Mar 2019, 6:02 PM
Hasan Oktay