|  | 
 
| 先看代码,<?php class Test extends Controller {
 function Test()
 {
 parent::Controller();
 }
 function get($a,$b)
 {
 echo $a.$b;
 }
 }
 ?>
 如果在浏览器上直接传输
 index.php/test/get/1/2
 可以正常显示成12
 如果传递中文变量
 index.php/test/get/1/中国
 CI报错提示:The URI you submitted has disallowed characters.
 
 可以用下面的方法暂时解决,修改\libraries/URL.php 189行(1.6.3)
 if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
 为
 if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", urlencode($str)))
 
 不过暂时只能支持在UTF-8的编码上,还请哪位高人能提供更好的解决方案
 
 [ 本帖最后由 路过人间 于 2008-6-30 10:19 编辑 ]
 | 
 |