您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

tp3.1.2 路由(伪静态)配置无效,崩溃中,该如何解决

2024/6/23 15:57:12发布20次查看
tp3.1.2 路由(伪静态)配置无效,崩溃中
config.php下:
'load_ext_config' => 'routes',
'url_html_suffix' => 'html',

routes.php下:
return array(
'url_router_on' => true,
'url_route_rules' => array(
'a/b/:id' => '/api/verify/:1',
),
);

但是当我访问xxx.com/a/b/1.html时,报错:无法加载模块:a
求助
------解决方案--------------------
访问xxx.com/a/b/1这个呢?应该没问题吧
------解决方案--------------------
确定你a控制器文件是否存在?还有a控制器命名是否满足驼峰式写法?
------解决方案--------------------
试试xxx.com/index.php/a/b/1.html
------解决方案--------------------
写到config.php里吧
'url_router_on'=>true,
'url_route_rules'=>array(
'/^index$/'=>'home/index/index',
'/^admin$/'=>'admin/index/index',
)
如果使用了独立分组要写到最外层公用config.php里面
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product