php 字符串加转义

180it 2021-11-05 PM 723℃ 0条
// 字符串加转义
function add_slashes($string){
    if (!$GLOBALS['magic_quotes_gpc']) {
        if (is_array($string)) {
            foreach($string as $key => $val) {
                $string[$key] = add_slashes($val);
            } 
        } else {
            $string = addslashes($string);
        } 
    } 
    return $string;
} 
支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

php 字符串加转义