关于目录结构的文档很多,但大部分都是关于MVC目录结构的。但是如果我们不想使用任何框架或 MVC 怎么办?
我真的很困惑。
第一个选项:
/public_html
/css
/images
/libs
index.php
profile.php
search.php
Run Code Online (Sandbox Code Playgroud)
第二种选择:我仍然可以使用 ww.mysite.com/index.php, ww.mysite.com/profile.php .. 链接结构
/libs
/public_html
/css
/images
index.php
profile.php
search.php
Run Code Online (Sandbox Code Playgroud)
第三个选项:我的链接是这样的:ww.mysite.com/index.php?view=search
/view
-profile.php
-search.php
/libs
/public_html
/css
/images
index.php
Run Code Online (Sandbox Code Playgroud)
哪一个是最佳实践?目录结构与安全性有关吗?谢谢大家的帮助!