strpos
没有找到>$2.99<
。我$html
在 if 语句之前已经回显了,我可以在其中找到>$2.99<
,但结果是not found
.
$webpage = file_get_contents ($itunesurl);
$html = htmlspecialchars ($webpage);
echo $html;
if(strpos($html, '>$2.99<') !== FALSE) {
echo 'found';
}
else {
echo 'not found';
}