+ 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

23rd Feb 2018, 7:39 PM
Eric
Eric - avatar
7 Answers
+ 1
https://youtu.be/7TF00hJI78Y follow this tutorial, it will help you out on that
23rd Feb 2018, 8:41 PM
Joseph David Zamora Murillo
Joseph David Zamora Murillo - avatar
+ 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.
24th Feb 2018, 2:38 AM
Toni Isotalo
Toni Isotalo - avatar
0
You don't put PHP in HTML file. You put it in the PHP file.
24th Feb 2018, 2:18 AM
Toni Isotalo
Toni Isotalo - avatar
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
24th Feb 2018, 5:05 AM
Eric
Eric - avatar
24th Feb 2018, 12:53 PM
Toni Isotalo
Toni Isotalo - avatar
0
alright thanks so what application should I get to run php code?
25th Feb 2018, 7:12 PM
Eric
Eric - avatar
0
https://youtu.be/7TF00hJI78Y follow this tutorial
25th Feb 2018, 7:20 PM
Joseph David Zamora Murillo
Joseph David Zamora Murillo - avatar