Welcome Guest, Not a member yet? Register   Sign In
codeigniter 1.7 on PHP5.3
#3

[eluser]nikkofu[/eluser]
the problem resolved!

here is my configs:

$config['permitted_uri_chars'] ='a-z 0-9~%.:_-u4e00-u9fa5';


<?php

class MY_URI extends CI_URI {
function _filter_uri($str)
{
if ($str != '' AND $this->config->item('permitted_uri_chars') != '')
{
//echo $str . '<br>';
$str = urlencode($str);
//echo preg_quote($this->config->item('permitted_uri_chars')) . '<br>';
/*
if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
{
exit('The URI you submitted has disallowed characters.');
} */
if ( ! preg_match("|^[a-z 0-9~%\.\:_-u4e00-u9fa5]+$|i", $str))
{
exit('The URI you submitted has disallowed characters.');
}
$str = urldecode($str);
}
return $str;
}

}


and here //echo preg_quote($this->config->item('permitted_uri_chars')) . '<br>'; shows different with PHP5.2.3-5

so i put the right string here
if ( ! preg_match("|^[a-z 0-9~%\.\:_-u4e00-u9fa5]+$|i", $str))


i dont know the reason and i'm a php beginner, i just make it with the string with the original echoed in php5.2.3-5


migration is not funny!

:S


Messages In This Thread
codeigniter 1.7 on PHP5.3 - by El Forum - 07-06-2009, 01:55 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-06-2009, 02:22 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-06-2009, 02:41 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-06-2009, 10:24 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-09-2009, 03:12 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-09-2009, 04:49 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-09-2009, 05:02 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-09-2009, 06:12 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-09-2009, 06:22 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-09-2009, 06:24 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-14-2009, 08:47 AM
codeigniter 1.7 on PHP5.3 - by El Forum - 07-14-2009, 09:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB