1.$name=trim($_POST['name']);//去除变量name两边的空格;
2.$name=ereg_replace("^ +| +$","",$name);//匹配去掉$name里符合第一个选项的字符替换成第二个选项的字符,¨,¨区分选项
3.变量尽量用单引号引用,否则用双引号需要转译
$query="select * from user_msg where name= '$name' and password='$password' ";
$query="select * from user_msg where name=\"$name\" and password=\"$password\"";
4.显示所有端口状态命令:
#netstat -ntupl
阅读(1577) | 评论(0) | 转发(0) |