为什么我在使用时收到此错误substr
:
警告:substr() 期望参数 2 很长`
$url = "http://coast.x-matic.net/forums/categories/pso-news";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$webdata = (string) curl_exec($ch);
curl_close($ch);
echo substr($webdata, "<a * class=\"title\">*</a>");