Blogger Information
Blog 4
fans 0
comment 0
visits 1943
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Tp5.1学习笔记
Tsui的博客
Original
835 people have browsed it

1.更改入口文件

根目录下新建index.php文件,写入以下内容:

<?php
// [ 应用入口文件 ]
namespace think;

// 定义应用目录
define('APP_PATH', __DIR__ . '/application/');
// 加载框架基础引导文件
require __DIR__ . '/thinkphp/base.php';
// 添加额外的代码
// ...

// 执行应用并响应
Container::get('app', [APP_PATH])->run()->send();

 

2.URL重写隐藏应用的入口文件index.php

改成
RewriteRule ^(.)$ index.php?/$1 [QSA,PT,L]


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!