正则在软件中通过,但是在php中不可用,如何解决
- PHP code
<?php//$code=file_get_contents('http://wvw.ranwen.com/info_24983.html');$code=file_get_contents('http://wvw.ranwen.com/info_41974.html');if (preg_match('/<div id="CrbsSum">.*<br \/>\s*((.|\n)+?)<\/div>/i', $code,$tmp)){ print_r($tmp);}else{ echo 'wasd';}
如上代码 注释第一个链接使用第二个的时候无法使用,但是当注释第二个使用第一个的时候可以,求助这是什么原因
[解决办法]
在我这运行,看他们的运行效果都是一样的。貌似没有差别。