php 匹配汉字

preg_match("/^[\x{4e00}-\x{9fa5}a-zA-Z0-9]+/u",$str);//匹配中文汉字字母数字

加入参数u,匹配utf8。


preg_match("/^[\xb0-\xf7][\xa0-\xfe]+$/",$str);//匹配gb2312汉字


preg_match("/^[".chr(0xa1)."-".chr(0xff)."]+$/",$str)//匹配gbk汉字

GET /index.php?id=1 HTTP/1.1 Host: 172.16.1.101 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: http://172.16.1.101/index.php?id=3 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 HTTP/1.1 200 OK Date: Mon, 08 Oct 2018 20:09:01 GMT Server: Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45 X-Powered-By: PHP/5.4.45 Content-Length: 736 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html;charset=utf-8 ...<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <div align="center"> <title>Kingsman</title> <h1>The Secret Service</h1> <h2>Agent</h2> </head> <body> <div align="center"> <a href="index.php?id=1"><font size="3" color="">Arthur</font></a>  <a href="index.php?id=2"><font size="3" color="">Merlin</font></a>  <a href="index.php?id=3"><font size="3" color="">Galahad</font></a>  <a href="index.php?id=4"><font size="3" color="">Lancelot</font></a></p> ......:Arthur<br ><p text-align:center><img src='fittingroom\images\Galahad1.jpg' width='240px'/></p> <a href="./fittingroom/login.php"><font size="3" color="">............</font></a></p> </body> </html> GET /index.php?id=2 HTTP/1.1 Host: 172.16.1.101 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: http://172.16.1.101/index.php?id=1 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 HTTP/1.1 200 OK Date: Mon, 08 Oct 2018 20:09:06 GMT Server: Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45 X-Powered-By: PHP/5.4.45 Content-Length: 734 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/html;charset=utf-8 ...<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <div align="center"> <title>Kingsman</title> <h1>The Secret Service</h1> <h2>Agent</h2> </head> <body> <div align="center"> <a href="index.php?id=1"><font size="3" color="">Arthur</font></a>  <a href="index.php?id=2"><font size="3" color="">Merlin</font></a>  <a href="index.php?id=3"><font size="3" color="">Galahad</font></a>  <a href="index.php?id=4"><font size="3" color="">Lancelot</font></a></p> ......:Merlin<br ><p text-align:center><img src='fittingroom\images\Merlin.jpg' width='240px'/></p> <a href="./fittingroom/login.php"><font size="3" color="">............</font></a></p> </body> </html> GET /index.php?id=3 HTTP/1.1 Host: 172.16.1.101 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: http://172.16.1.101/index.php?id=2 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 HTTP/1.1 200 OK Date: Mon, 08 Oct 2018 20:09:06 GMT Server: Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45 X-Powered-By: PHP/5.4.45 Content-Length: 737 Keep-Alive: timeout=5, max=98 Connection: Keep-Alive Content-Type: text/html;charset=utf-8 ...<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <div align="center"> <title>Kingsman</title> <h1>The Secret Service</h1> <h2>Agent</h2> </head> <body> <div align="center"> <a href="index.php?id=1"><font size="3" color="">Arthur</font></a>  <a href="index.php?id=2"><font size="3" color="">Merlin</font></a>  <a href="index.php?id=3"><font size="3" color="">Galahad</font></a>  <a href="index.php?id=4"><font size="3" color="">Lancelot</font></a></p> ......:Galahad<br ><p text-align:center><img src='fittingroom\images\Galahad2.jpg' width='240px'/></p> <a href="./fittingroom/login.php"><font size="3" color="">............</font></a></p> </body> </html> GET /fittingroom/login.php HTTP/1.1 Host: 172.16.1.101 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: http://172.16.1.101/index.php?id=3 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 HTTP/1.1 200 OK Date: Mon, 08 Oct 2018 20:09:07 GMT Server: Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45 X-Powered-By: PHP/5.4.45 Content-Length: 1332 Keep-Alive: timeout=5, max=97 Connection: Keep-Alive Content-Type: text/html; charset=utf8 ...<html lang="en"> <!--password.txt--> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Identification</title> <link rel="stylesheet" type="text/css" href="./css/login.css" /> </head> <body> <div align="center"> <br /> <p><img src="./images/login_logo.jpg" style="margin-right:20px" /></p> <br /> <form name="login" action="login.php" method="post"> <fieldset> <label for="username">Username</label><input class="loginInput" type=text name="username" maxlength="15" value="Arthur"></br> <!--...........................--> <label for="password">Password</label><input class="loginInput" type=password name="password" maxlength="15" ></br> <!--....................................--> <!--<label for="username">Username</label><input class="loginInput" type=text name="username" maxlength="15" value="Arthur" style="visibility:hidden"></br>--> <!--<label for="password">Password</label><input class="loginInput" type=password name="password" maxlength="5" style="visibility:hidden"></br>--> <input type="submit" name="submit" value="Login" style="margin-left:241px"> </fieldset> </form> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <font size=3 style="margin-right:26px">Manners Maketh Man</font><br /> </body> </html> 根据上面的信息可以得出他干了些什么?
10-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值