addslashes_gpc

函式
addslashes_gpc ( $gpc )
引數
  • (string|array) $gpc String or array of data to slash.
    Required:
返回值
  • (string|array) Slashed `$gpc`.
定義位置
相關方法
addslashes_strings_onlyadd_cssclassstripslashes_deepadd_pages_pageadd_users_page
引入
0.71
棄用
-

addslashes_gpc – 為字串中的特殊字元新增反斜線,防止它們被解釋為SQL查詢的一部分: 這個函式用於在資料插入資料庫之前對其進行淨化。在”_

將斜線新增到一個字串中,或遞迴地將斜線新增到一個陣列中的字串中。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function addslashes_gpc( $gpc ) {
return wp_slash( $gpc );
}
function addslashes_gpc( $gpc ) { return wp_slash( $gpc ); }
function addslashes_gpc( $gpc ) {
	return wp_slash( $gpc );
}

常見問題

FAQs
檢視更多 >