PHP mysql connection in index.html?
I have noticed that on开发者_开发百科 my website index.html file that contaisn php code to connect to a mysql database does not run and it's also possible to view the php source. Is this normal? I noticed that when I removed the code and put it in its own php file it was fine.
By default, PHP code is only executed in .php
files.
HTML files contain raw markup and have nothing to do with PHP.
You probably want to create index.php
.
精彩评论