0
이 간단한 코드입니다 : (간단한 HTML DOM) 우리가이 오류 얻을 구글 페이지에 존재 나던다른 방법
$html = file_get_html('http://google.com');
$title = $html->find('div.newsBody h1', 0)->plaintext;
echo "Title:". $title;
div.newsBody 경우 :
Notice: Trying to get property of non-object in...
을
if(file_get_html('http://google.com'))
{
$html = file_get_html('http://google.com');
if($html->find('div.newsBody h1', 0))
echo $html->find('div.newsBody h1', 0)->plaintext;
else
echo "No div found!";
}
else
echo "No webpage Access!";
그것이 사실 :
지금 나는이 오류를 처리하려면? 또는 더 나은 해결책이 있습니까? 그것을 할,하지만 자신을 반복하지 않는 방법
사용'cURL' 대신 ... 확인 [예] (http://stackoverflow.com/a/18668562/1519058) – Enissay