在codeiginter中路由两个参数

时间:2017-11-04 11:52:07

标签: codeigniter url routes

我试着像这样在codeiginter中路由我的网址。

$route['apps/(:any)/(:any)'] = 'apps/index/$1/$2';

因为我想要网址

domain.com/apps/parameter1/parameter2

这是我的控制器代码

<?php
if( ! defined('BASEPATH')) exit('No Directory');
    class Apps extends CI_Controller{

        public function index($app_id=null, $result_id=null){
.....
        }

    }

但它确实有用,任何人都可以帮助我解决我的溃败网址有什么问题。我使用Codeiginter 3.x

0 个答案:

没有答案
相关问题