Wednesday, September 11, 2013

In Codeigniter fetching symbols from URI intepret differently

In Codeigniter fetching symbols from URI intepret differently

I am fetching '$' symbol from uri. And I have already added $ in
permitted_uri_chars in config file. Later I am fetching data from database
using that uri string. issue can be seen from below example.
MY Url is like this ....
.....com/search/shirt/$
My Example code is this ...
echo $this->uri->segment('3');
echo "<br>";
var_dump($this->uri->segment('3'));
echo "<br>";
$dol_sign = '$';
echo $dol_sign;
echo "<br>";
var_dump($dol_sign);
MY Output of above code is this ...
$
string(5) "$"
$
string(1) "$"
it is taking segment as differently. that is why i m having issue in
fetching data from DB matching with URI segment.

No comments:

Post a Comment