gcdb::escape()
最后更新于:2021-11-26 08:23:10
gcdb::escape( string|array$data)Do not use, deprecated.
参数
- $data
-
(string|array) (Required) Data to escape.
响应
(string|array) Escaped data, in the same type as supplied.
源文件
文件: gc-includes/gc-db.php
public function escape( $data ) {
if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
_deprecated_function( __METHOD__, '3.6.0', 'gcdb::prepare() or esc_sql()' );
}
if ( is_array( $data ) ) {
foreach ( $data as $k => $v ) {
if ( is_array( $v ) ) {
$data[ $k ] = $this->escape( $v, 'recursive' );
} else {
$data[ $k ] = $this->_weak_escape( $v, 'internal' );
}
}
} else {
$data = $this->_weak_escape( $data, 'internal' );
}
return $data;
}