php – 如何修改codeigniter中的路由
发布时间:2020-12-13 21:46:20 所属栏目:PHP教程 来源:网络整理
导读:帮助我. 举个例子:我有这个正常的网址 “本地主机/ CI / index.php的/碱/ storeurl”. 我怎样才能让Codeigniter知道寻找 “本地主机/ CI / storeurl”. 我有一个名为index的函数,它接受Base.php类中的参数storeURL.帮助我.提前致谢. 解决方法 我终于找到了
帮助我.
举个例子:我有这个正常的网址 我怎样才能让Codeigniter知道寻找 我有一个名为index的函数,它接受Base.php类中的参数storeURL.帮助我.提前致谢. 解决方法
我终于找到了我想要的东西.以下是我的代码在routes.php中的样子.
/* Custom Routes. */ // Store Normal Pages. $route['home/(:any)'] = "base/home/$1"; $route['about/(:any)'] = "base/about/$1"; $route['services/(:any)'] = "base/services/$1"; $route['contact/(:any)'] = "base/contact/$1"; $route['feedback/(:any)'] = "base/feedback/$1"; // CategoryPage. $route['category/(:any)/(:num)'] = "base/category/$1/$2"; // ProductPage. $route['product/(:any)/(:num)'] = "base/product/$1/$2"; // For Main Home Page. $route['(:any)'] = "base/home/$1"; 我非常感谢所有帮助我解决这个问题的人.感谢你们. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |