php文件可以像HTML文件一样在互联网上浏览吗? [英] Can php files be viewed across the internet like html files?
本文介绍了php文件可以像HTML文件一样在互联网上浏览吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我想查看用html编写的网页的代码,我只需要右键单击并选择查看源代码。同样可以用php文件来完成,这样我就可以学习如何完成某些任务?有没有办法隐藏代码?
解决方案
除非服务器设置非常不正确,否则。例如,在我的includes / database.php文件的顶部,我有三行,看起来像
$ host =localhost;
$ username =myuser;
$ password =mypassword;
你可以看到为什么我不希望公开显示...
if I want to view the code of a web page written in html I just need to right click and select view source. Can the same be done with php files so I can learn how certain tasks are being accomplished? Is there a way to hide the code?
解决方案
Unless the server is very improperly set up, no. Very no.
For example, at the top of my "includes/database.php" file, I have three lines that look like
$host = "localhost";
$username = "myuser";
$password = "mypassword";
You can see why I'd not want that publicly visible...
这篇关于php文件可以像HTML文件一样在互联网上浏览吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文