채택완료

날씨정보 플러그인 받아서 했는데 안되는데 이유 좀...

<?php include_once (G5_PLUGIN_PATH.'http://timeplace.co.kr/board/plugin/weatherfeed/yahooweather.php'); ?>




Warning: include_once() [function.include]: Failed opening '/home/tnhands/public_html/board/pluginhttp://timeplace.co.kr/board/plugin/weatherfeed/yahooweather.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /home/tnhands/public_html/index.php on line 117 

답변 4개 / 댓글 4개

채택된 답변
+20 포인트
2016-10-20 (목) 13:19:49

지금은 지우신듯 하지만 전에 댓글을 쓰셨을때

경로는 board/plugin/에 들어가있습니다
<?php
 include G5_PLUGIN_PATH.'/weatherfeed/yahooweather.php';
 ?>
밑에처럼도 해보고 이렇게도 해봤는데 아무것도 안뜨는데요...

이렇게 올리셨잖아요.

모든 파일은 루트/plugin/weatherfeed 폴더 안에 들어가 있어야 합니다. 

답변에 대한 댓글 1개

예.. 다들어가있습니다... 그런데 야후에서 이걸 이제 막아놨다고 하는거같은데.. 맞나요?
2016-10-20 (목) 12:38:08

경로는 board/plugin/에 들어가있습니다
<?php
 include G5_PLUGIN_PATH.'/weatherfeed/yahooweather.php';
 ?>
밑에처럼도 해보고 이렇게도 해봤는데 아무것도 안뜨는데요...

경로가 잘못되었네요.

board/plugin 에 들어가는 것이 아니라

루트디렉토리 plugin 에 들어가야 합니다.

앞서 말씀드린것처럼 경로상수 G5_PLUGIN_PATH 는

그누보드주소/plugin 까지 대체 됩니다.

파일을 board/plugin 안에 넣으니 당연이 안되죠.

답변에 대한 댓글 1개

잘 이해가....
<?php include_once (G5_PLUGIN_PATH.'/weatherfeed/yahooweather.php'); ?>
하면 루트디렉토리 plugin에 들어가있는거 아닌가요?
2016-10-20 (목) 12:36:49

사이트 주소를 알려주시면 자세히 알려드릴텐데 아쉽네요^^

일단 추측으로 파일이 누락되어 안나오는것으로 보입니다.

그누보드 플러그인 폴더안에

weatherfeed 폴더가 있고

weatherfeed 폴더안에 다음과 같은 파일이 있어야 합니다.

yahooweather.php

jquery.zweatherfeed.min.js

style.css

이 세가지 파일만 있다면 크게 안될것은 없어보이는데요.

파일이 모두 있는지 채크해보세요.

2016-10-20 (목) 12:08:35

주소가 잘못되었네요^^

<?php include_once

(G5_PLUGIN_PATH.'http://timeplace.co.kr/board/plugin/weatherfeed/yahooweather.php'); ?>

경로상수를 미리 정의했는데 그걸 무시하고 주소를 모두 입력하니

사이트상에서는

http://timeplace.co.kr/board/plugin/http://timeplace.co.kr/board/plugin/weatherfeed/yahooweather.php

이렇게 불러오게 되는거에요.

G5_PLUGIN_PATH. 이 경로상수는

http://timeplace.co.kr/board/plugin 여기까지 자동으로 입력해줍니다^^

따라서

<?php include_once (G5_PLUGIN_PATH.'/weatherfeed/yahooweather.php'); ?>

요로케 하시면 되겠습니다^^

답변에 대한 댓글 2개

했는데 해당 사이트에서 아무것도 안나오는데요...ㅠ.ㅠ 초보자라 좀 부탁드립니다

<?php include_once (G5_PLUGIN_PATH.'/weatherfeed/yahooweather.php'); ?>


<yahooweather.php>

<script src="<?php echo G5_PLUGIN_URL?>/weatherfeed/jquery.zweatherfeed.min.js"></script>
<link href="<?php echo G5_PLUGIN_URL?>/weatherfeed/style.css" rel="stylesheet" type="text/css" />
<div id="kweather"></div>
<script type="text/javascript">
$(document).ready(function () {
$('#kweather').weatherfeed(['KSXX0037'], {
refresh : 1
});
});
</script>
경로는 board/plugin/에 들어가있습니다

<?php
include G5_PLUGIN_PATH.'/weatherfeed/yahooweather.php';
?>
밑에처럼도 해보고 이렇게도 해봤는데 아무것도 안뜨는데요...

답변을 작성하려면 로그인이 필요합니다.