http://www.canbike.org/information-technology/php-fatal-error-call-to-a-member-function-find-on-a-non-object.html
[]
[PHP] warning mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given
$result = mysqli_query($conn, $query) or die(mysqli_error($conn));
from http://lunaticlobelia.tistory.com/465
[20160717 1207]
[에러 로그]
Fatal error: Uncaught Error: Call to a member function find() on boolean in /home/eondcom/public_html/misc/parser/index.php:58 Stack trace: #0 {main} thrown in /home/eondcom/public_html/misc/parser/index.php on line 58
[푸ㄹ이고ㅏㅈㅓㅇ]
process1. var_dump
위와 같은 오류가 나오길래, var_dump() 명령어를 사용해서 한줄씩 써봤다.
$bodyRs = curl_get_content($target_url);
$content = str_get_html($bodyRs);
echo ("bodyRs : "); var_dump($bodyRs);
echo("content:"); var_dump($content); var_dump($titleRow);
결과는,
bodyRs : bool(false)
content:bool(false)
Notice: Undefined variable: titleRow in /home/eondcom/public_html/misc/parser/index.php on line 60
NULL
음. 그럼 trueㄱㅏ 나오ㅏㅇㅑ 하나?
search result1. Use cURL set a user-agent
http://stackoverflow.com/questions/15636072/simple-html-dom-parser-html-is-empty
search result1 content :
이 그ㄹ으ㅣ 그ㄹㅆㅡㄴ이ㄷㅗ 자ㄱㅣㄴㅡㄴ ㅇㅗㅏㄴ벼ㄱ하게 해ㅆ다ㄴㅡㄴ데 오ㄹㅠ가 ㅂㅏㄹ새ㅇㅎㅐ서 도ㅈㅓ히 이ㅇㅠㄹㅡㄹ 모ㄹㅡ게ㅆ다ㄱㅗ 하소여ㄴ ㅎㅐㅆ따.
$html returns nothing. However, when I'm doing the same thing using this url, http://thepiratebay.se/browse/207/0/7, I get a normal response.
I don't really understand why since the url works perfectly.
A var_dump on $html returns a bool (false)
I have php 5.3.1 and allow_url_fopen is on in php.ini
1) var_dump로 bool(false)로 나오는 건 나와 동일하다..
2) php 5.5 이상이었고, php.ini에서 allow_url_fopen 인지 확인 후 ok 였다.
search result1 output : failed.