+ 2
Where on a HTML file to I put my php code
I just started the course and I like to practice as I progress through the course but I don't know where to put the code
7 Answers
+ 1
https://youtu.be/7TF00hJI78Y follow this tutorial, it will help you out on that
+ 1
@Jay Matthews Without any modifications the only way is Iframe or http requests to execute the file.
You can run PHP code directly in .html file if you tell your server to recognize it as PHP file using .htaccess or editing you HTTP server config file but otherwise html doesn't support PHP code because the server doesn't know how to execute it.
0
You don't put PHP in HTML file. You put it in the PHP file.
0
ok so wait I Cant
if I put php code inside the php tags which are inside the <body> tags alone will that work or do I not need any HTML at all
0
No you do not.
https://www.sololearn.com/Discuss/1069924/?ref=app
0
alright thanks so what application should I get to run php code?
0
https://youtu.be/7TF00hJI78Y follow this tutorial