为什么'('改为(? [英] Why '(' change to ( ?

查看:63
本文介绍了为什么'('改为(?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



遇到问题。

Dear my friends,

I meet a problem.

$query = $this->db->query("SELECT p_endgrid_i('".$date."','".$cb_line."','".$cb_model."','".$cb_process."','".$url_item."');");



$ url_item的数据有'()',我不知道他们为什么会改为'& #40;&安培; #41;'在MySQL的过程中。

我尝试了很多次,我发现它不是CI函数和mysql问题。

和echo $ url_item在html中是nomarl页面。

现在我不知道如何解决这个问题,我想知道它为什么会发生?



Plz帮助!

非常感谢!



--------------------- -----------------------------------------

2014 / 12/02



我发现它可能被识别为字符或数组。

现在,我使用以下方法来解决我的问题问题。

$ url_temp3 = str_replace((,(,$ url_temp2);

$ url_item = str_replace() ,),$ url_temp3);



我想知道另一种正确的方法,我认为这是一种临时方法。

我想知道为什么这么多!



谢谢你的朋友们!


The data of $url_item has '()',i don't know why they are changed to '& #40;& #41;' in process of MySQL.
I try many times,i found it isn't CI function and mysql problem.
And echo $url_item is nomarl in html page.
Now i don't know how to solution this problem,and i want to know why it happen?

Plz help!
Thank you very much!

--------------------------------------------------------------
2014/12/02

I found it maybe is recognized as a character or array.
Now,I use the following way to solution my problem.
$url_temp3 = str_replace("& #40;","(",$url_temp2);
$url_item = str_replace("& #41;",")",$url_temp3);

I want to know another right way, i think it is a temporary method.
And i want to know why so much!

Thank you my friends!

推荐答案

查询 =
query =


this-> db-> query( SELECT p_endgrid_i('
this->db->query("SELECT p_endgrid_i('".


date。 ','


这篇关于为什么'('改为(?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆