【发布时间】:2013-06-03 04:03:52
【问题描述】:
如果网站http://www.stutteringjohnsmith.com 中包含“standup”一词,请告诉我如何更改以下 PHP 脚本以显示“找到”,如果没有则显示“未找到”
<?php
$data = file_get_contents('http://www.stutteringjohnsmmith.com/#/0');
$regex = '/Page 1 of (.+?) results/';
preg_match($regex,$data,$match);
var_dump($match);
echo $match[1];
?>
【问题讨论】: