简体   繁体   中英

Can I use mysql_real_escape_string together with strip_tags?

抱歉,如果这是一个愚蠢的问题,但是我目前有以下内容,并且它正在浏览器中运行,但Dreamweaver告诉我存在语法错误:

$formdescription = mysql_real_escape_string(strip_tags($_POST['form_description']));

Yes, it's ok :) Forget Dreamweaver!

You can also split the above:

$formdescription = $_POST['form_description'];
$formdescription = strip_tags($formdescription);
$formdescription = mysql_real_escape_string($formdescription);
string mysql_real_escape_string ( string $unescaped_string [, resource $link_identifier = NULL ] )

该函数的操作取决于当前mysql连接的编码,必须传递第二个参数[, resource $link_identifier = NULL ]以避免DW中出现警告。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM