WordPress 常用函数 / addslashes_gpc

给转义的字符串添加 /

如果 PHP 中设置了 magic-quotes-gpc,首先把所有 / 删除。

<?php addslashes_gpc( $gpc ) ?>

$gpc
(string) (required) HTTP 请求数据中返回的字符串
Default: 无

(string)
返回使用 / 转义之后的字符串。

  • 使用到的全局变量: (object) $wpdb

Since: 0.71

wp-includes/formatting.php