curl 파싱을 할때~~ 에러나오는데요 채택완료
에러난다고 하는데...어떤 설정을 해야할까요..
simplexml_load_file()
Invalid argument supplied for foreach()
Warning: simplexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/wbc/public_html/curl/sam3.php on line 5 Warning: simplexml_load_file(http://www.kma.go.kr/wid/queryDFSRSS.jsp): failed to open stream: no suitable wrapper could be found in /home/wbc/public_html/curl/sam3.php on line 5 Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://www.kma.go.kr/wid/queryDFSRSS.jsp" in /home/wbc/public_html/curl/sam3.php on line 5 Warning: Invalid argument supplied for foreach() in /home/wbc/public_html/curl/sam3.php on line 7
http://www.kma.go.kr/wid/queryDFSRSS.jsp'; //$object = simplexml_load_string($xmlstr); $object = simplexml_load_file($xmlstr); $channel = $object->channel; foreach($channel->item as $value) { $title = $value->title; $description = $value->description; $link = $value->link; echo $title; echo " "; echo $description; echo " "; } ?>
답변 2개
보안상 이유로 php.ini를 통해서만 설정 가능하다네요.
아래를 참조해 보시죠.
http://www.php.net/manual/en/ini.list.php" rel="nofollow">http://www.php.net/manual/en/ini.list.php
http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen" rel="nofollow">http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
line 추가되어 번호만 다르고~~