sql简单防注入
function filter_keyword($string) { $keyword = 'select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|and|union|order|or|into|load_file|outfile'; $arr = explode( '|', $keyword ); $result = str_ireplace( $arr, '', $string ); return $result; }