gcdb::_escape()
最后更新于:2021-11-26 09:06:36
gcdb::_escape( string|array$data)Escapes data. Works on arrays.
参数
- $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 ( is_array( $data ) ) {
foreach ( $data as $k => $v ) {
if ( is_array( $v ) ) {
$data[ $k ] = $this->_escape( $v );
} else {
$data[ $k ] = $this->_real_escape( $v );
}
}
} else {
$data = $this->_real_escape( $data );
}
return $data;
}