like_escape()
最后更新于:2021-11-27 12:52:34
like_escape( string$text)Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
参数
- $text
-
(string) (Required) The text to be escaped.
响应
(string) text, safe for inclusion in LIKE query.
源文件
文件: gc-includes/deprecated.php
function like_escape($text) {
_deprecated_function( __FUNCTION__, '4.0.0', 'gcdb::esc_like()' );
return str_replace( array( "%", "_" ), array( "\%", "\_" ), $text );
}