可能重複時, 「分隔符不能是字母,數字或反斜線」 錯誤:
Converting ereg expressions to preg故障診斷更改額日格()來的preg_match()
<?php
$searchtag = "google";
$link = "http://images.google.com/images?hl=de&q=$searchtag&btnG=Bilder-Suche&gbv=1";
$code = file_get_contents($link,'r');
ereg("imgurl=http://www.[A-Za-z0-9-]*.[A-Za-z]*[^.]*.[A-Za-z]*", $code, $img);
ereg("http://(.*)", $img[0], $img_pic);
echo '<img src="'.$img_pic[0].'" width="70" height="70">'; ?>
,我得到這個錯誤
棄用:函數ereg()在C:\ P中不推薦使用rogram Files \ EasyPHP-5.3.8.1 \ www \ m \ img.php on line 5
不推薦使用:函數ereg()在C:\ Program Files \ EasyPHP-5.3.8.1 \ www \ m \ img中不推薦使用。上行PHP 6
的preg_match()函數得到這個誤差
警告:的preg_match()[function.preg匹配]:分隔一定不能在C字母數字或反斜槓:\ Program Files文件\第6行EasyPHP-5.3.8.1 \ www \ m \ img.php
警告:preg_match()[function.preg-match]:Del imiter不能在C字母數字或反斜槓:\ Program Files文件\的EasyPHP-5.3.8.1 \第7行
鏈接的問題可以回答他的問題,但如何使這些問題重複? –