美文网首页
upupw环境,tp5去public/index.php

upupw环境,tp5去public/index.php

作者: riyihu | 来源:发表于2017-08-05 11:10 被阅读0次

    去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

          本文链接:https://www.haomeiwen.com/subject/aqpilxtx.html