mysql 转义函数谁给小弟一个 PHP mysql 转义函数谁给小弟一个,查询的时候好像还要反转义函数,赐教!<>之类的符号应该能转吧mysql转义 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我不知道啊,就是表单提交的,反正输入MYSQL的用的着的就转,好像不转的话<div style="width:1000000000000px;">abc</div>这不就惨了? 这个是要转的,不然就出错了。入库转一下即可,出库显示就不需要了。ExamplesExample 1. mysql_escape_string() example<?php$item = "Zak's Laptop";$escaped_item = mysql_escape_string($item);printf("Escaped string: %s\n", $escaped_item);?> The above example will output:Escaped string: Zak\'s Laptop NotesNote: mysql_escape_string() does not escape % and _. See Alsomysql_real_escape_string() addslashes() The magic_quotes_gpc directive. 你看下mysql_escape_string这个函数后面都说了是string,你却给他个数组。。你接收的表单一个一个转完之后再入库! 正则表达式 COUNT的排序问题 php能定义数组为类的常量吗?? PHP怎么判断字符串中包含重复相同的数字? 请问一个一页显示问题 几个小问题,急,只好请教各位了 求助各位高手:为什么我的上传在WINDOWS下能正常运行,放到UNIX下就不能上传了? 关于用户认证的问题 appserver 新建的虚拟主机访问的都是一个位置,什么原因。 阿里云 lnmp环境 调用curl时,老是报错:77-Problem with the SSL CA cert。求打救 PHP 和 VB SOCKET 通信问题 请各位看下 移动到右边的,为什么要选中后提交才能获取到相应的值。
入库转一下即可,出库显示就不需要了。
Examples
Example 1. mysql_escape_string() example<?php
$item = "Zak's Laptop";
$escaped_item = mysql_escape_string($item);
printf("Escaped string: %s\n", $escaped_item);
?> The above example will output:Escaped string: Zak\'s Laptop
Notes
Note: mysql_escape_string() does not escape % and _. See Also
mysql_real_escape_string()
addslashes()
The magic_quotes_gpc directive.