thinkphp5 URL how to hide public
正念的奇迹
正念的奇迹 2017-08-02 11:37:51
0
1
2143

I put the index module into public as written in the manual, and the application directory of the entry file was also changed.

Then the URL is servername/public/index.php

Online The tutorial says to directly set the website root directory to public.

Then I would like to ask, why can the index module be directly accessed when it is placed in the application?

正念的奇迹
正念的奇迹

继续学习奋勇向前

reply all(1)
Ty80

The entrance is placed in the public for security reasons, so that the web cannot directly access the controller or template file without going through the entrance. This is safer and will not be attacked by hackers. Only access to open access points in the public is allowed. Not only TP5, the laravel framework is also in the public.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template