upupw环境,tp5去public/index.php

去public,upupw目录下找到vhosts.conf文件
server {
listen 80;
server_name 127.0.0.1 alias 127.0.0.1;
location / {
root C:/UPUPW5.6/htdocs/public;
index index.html index.htm default.html default.htm index.php default.php app.php u.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
root C:/UPUPW5.6/htdocs/public; 将root定位到public下即可
也可以在upup控制板里设置
去index.php
tp框架找到项目下的route.php文件
return [
'pattern' => [
'name' => '\w+',
],
'[hello]' => [
':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
':name' => ['index/hello', ['method' => 'post']],
],

// 定义资源路由

// 'rest' => [
// 'admin' => 'admin/admin',
// ],
'' => 'admin/Login/index',去index.php
];

你可能感兴趣的:(upupw环境,tp5去public/index.php)