开发者

PHP mysql connection in index.html?

开发者 https://www.devze.com 2023-04-09 17:18 出处:网络
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 no

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消