WordPress 功能函数—— addslashes_gpc(添加斜杠以转义字符串)

描述

添加斜杠以转义字符串。

如果设置了magic_quotes_gpc,将首先删除斜杠。

用法

  1. addslashes_gpc( string $gpc )

参数

$gpc

(string) (必需) 从HTTP请求数据返回的字符串。

返回

(string)返回使用斜杠转义的字符串。

来源

文件:wp-includes/formatting.php

  1. function addslashes_gpc( $gpc ) {
  2. if ( get_magic_quotes_gpc() ) {
  3. $gpc = stripslashes( $gpc );
  4. }
  5. return wp_slash( $gpc );
  6. }

本文原创,作者:萨龙龙,其版权均为萨龙网络所有。
如需转载,请注明出处:https://salongweb.com/wordpress-functions-addslashes-gpc.html

"愿我的文字能带给您一丝美好"

还没有人赞赏,支持一下

评论

A 为本文作者,G 为游客总数:0
加载中…

提交评论

我的购物车

购物车为空

优惠券

没有优惠券