2011-07-26 42 views

回答

0

您不需要首先通过$this->uri->segment('{n}')获取GET请求的所有部分吗?

我可能是错的,但我不认为你这样做的方式是正确的。如果我要编码,我会做以下事情:

function index() 
{ 
    $barcode = $this->uri->segment('3'); 
    $text = $this->uri->segment('4'); 
    $format = $this->uri->segment('5'); 
    $quality = $this->uri->segment('6'); 
    $width = $this->uri->segment('7'); 
    $height = $this->uri->segment('8'); 
    $type = $this->uri->segment('9'); 

    // continue with your code 
} 
+0

他这样做的方式很好。请参阅CI的['uri_to_assoc()'](http://codeigniter.com/user_guide/libraries/uri.html)和PHP的['func_get_args()'](http://php.net/manual/en/function .FUNC-GET-args.php)。这是一个编码斜线的问题,对我来说,我得到一个*服务器* 404(不是一个CI)。我不知道为什么,用'.htaccess'做些什么? –