TP5通过url()生成地址问题

浏览:42568 发布日期:2016/07/15 分类:ThinkPHP5专区 关键字: TP5 URL
下面是配置    // PATHINFO变量名 用于兼容模式
    'var_pathinfo'           => 's',
    // 兼容PATH_INFO获取
    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
    // pathinfo分隔符
    'pathinfo_depr'          => '/',
    // URL伪静态后缀
    'url_html_suffix'        => '',
    // URL普通方式参数 用于自动生成
    'url_common_param'       => false,
    //url禁止访问的后缀
    'url_deny_suffix'        => 'ico|png|gif|jpg|html|htm',
    // URL参数方式 0 按名称成对解析 1 按顺序解析
    'url_param_type'         => 0,
    // 是否开启路由
    'url_route_on'           => false,
    // 是否强制使用路由
    'url_route_must'         => false,
    // 域名部署
    'url_domain_deploy'      => false,
    // 域名根,如.thinkphp.cn
    'url_domain_root'        => '',
    // 是否自动转换URL中的控制器和操作名
    'url_convert'            => true,
    // 默认的访问控制器层
    'url_controller_layer'   => 'controller',
    // 表单请求类型伪装变量
    'var_method'             => '_method',
上面这个配置的情况下,在view使用url('get')来生成地址,如果当前的地址栏URL为:http://www.xxx.com/ 的时候,生成的地址是:http://www.xxx.com/index/index/get,如果当前的地址栏的地址为:http://www.xxx.com/index.php 的话,生成的地址就是:http://www.xxx.com/index.php/index/index/get
这个是什么情况呢????是配置问题?我只想要生成http://www.xxx.com/index.php/index/index/get这样的地址就好
另外兼容模式又要如何设置??想要生成http://www.xxx.com/index.php?s=/index/index/get 这个的地址如何配置???
最佳答案
评论( 相关
后面还有条评论,点击查看>>