Laravel Public Folder

杀马特。学长 韩版系。学妹 提交于 2021-01-27 06:30:29

问题


I was wondering if someone could shed some light as to why the index.php file for a laravel application lives in the public directory. What are the risks if I were to move it into the root directory instead?


回答1:


The files and folders in laravels public folder are meant to be web accessible. For security, all other files and folders in the laravel framework should not be web accessible.

Moving the index.php to laravels root will break the framework and defy best practices.

Follow these instructions to ensure your servers config points to the public directory for DocumentRoot



来源:https://stackoverflow.com/questions/12645538/laravel-public-folder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!