MVC --- 创建转义url传递字符串的函数

xiaoxiao2021-02-27  189

function adds($str){ return (!get_magic_quotes_gpc()) ?addslashes($str) :$str ; // get_magic_quotes_gpc — 获取当前 magic_quotes_gpc 的配置选项设置,返回 TRUE,双引号、反斜杠或 NUL 都不会被转义。 只有单引号会被转义。 // addslashes() - 使用反斜线引用字符串 }

转载请注明原文地址: https://www.6miu.com/read-15763.html

最新回复(0)