- function cleanuserinput($dirty){
- if (get_magic_quotes_gpc()) {
- $clean = mysql_real_escape_string(stripslashes($dirty));
- }else{
- $clean = mysql_real_escape_string($dirty);
- }
- return $clean;
- }
- //该片段来自于http://www.codesnippet.cn/detail/14122012992.html
来源: http://www.codesnippet.cn/detail/14122012992.html