Blogger Information
Blog 1
fans 0
comment 0
visits 4701
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
tp5将首页定位到根目录下的解决方法
心误了年华的博客
Original
4720 people have browsed it

此方法适用于tp5项目在云空间(云主机)下的搭建。

  1.      将public目录下的index.php移动到根目录。

    1.png

     2 .将index.php文件内容进行修改。

        修改前:

         2.png

        修改后:

        3.png

3.     将public目录下的.htaccess移动到根目录。

        4.png

4.     修改public目录下的router.php文件

        修改前:

            5.png

        修改后:

            6.png

修改完成后效果:

            7.png

之后在修改静态文件目录,项目即可完美运行。在资源文件路径前添加/public/


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!