当前位置:Gxlcms > PHP教程 > php两层过滤,获取留言的内容

php两层过滤,获取留言的内容

时间:2021-07-01 10:21:17 帮助过:14人阅读

//两层过滤,获取留言的内容
$str='测试文字1
楼主留言:
测试文字2..
'; //$str='厉害'; //preg_match("/[^.*](style=\"font-size:14px;line-height:150%;padding:10px;\">)(.*)<\/div>.*$/",$str, $str_arr);
preg_match("/[^.*]id=\"read_[0-9]{8}\" (style=\"font-size:14px;line-height:150%;padding:10px;\">)(.*)<\/div>.*$/",$str, $str_arr); //修复一下过滤楼主的留言
	//print_r($str_arr);
	
	if($str_arr[1]=="style=\"font-size:14px;line-height:150%;padding:10px;\">"){
	echo "find!";
	//

以上就介绍了php两层过滤,获取留言的内容,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

人气教程排行