날씨 관련 채택완료
Parse error: syntax error, unexpected '{' in /home/tnhands/public_html/board/ds/ds.php on line 9
이거 에러 뜨는데 왜그런가요?
9번라인은...밑에 표시해놨습니다
//*density2002@naver.com * $url = "http://http://api.openweathermap.org/date/2.5/weather?lat=37.56826&lon=126.977829%APPID=[1111111111111111111">http://http://api.openweathermap.org/date/2.5/weather?lat=37.56826&lon=126.977829%APPID=[1111111111111111111]" 9번라인 { "coord":{ "lon":126.98, "lat":7=37.57 },
"weather":[ {"id":800, "main":"clear" "description": "clear sky", "icon":"01d" } ], "base":"station", "main":{ "temp":297.56, "pressure":1008, "humidity":64, "temp_min":295.15, "temp_max":301.15 },
"visibility":10000, "wind":{ "speed":0.5, "deg":20 },
"clouds":{ "all":1 },
"dt":1467024600, "sys":{ "type":1, "id":8519, "message":0.0126, "country":"KR", "sunrise":1466971978, "sunset":14670025047, },
"id":1835848, "name":"Seoul" "cod":200 }
?>
답변 3개
ds.php 파일이 어떻게 코딩되어 있는지 보여 주셔야 할 듯합니다.
지금 올려 주신 건 위 api에서 보내 주는 데이터 아닌가요?
답변에 대한 댓글 4개
이글은 index.php에서 나타는 문글이고요
<?php
//*Copyright © HoneyMusic*
//*Yu-sung heon *
//**** 개인정보보호를 위한 이메일주소 노출방지 *** *
$url = "http://http://api.openweathermap.org/date/2.5/weather?lat=37.56826&lon=126.977829%APPID=[1111111111111111111]"
9번라인 {
"coord":{
"lon":126.98,
"lat":7=37.57
},
이런 게 ds.php 파일을 열면 들어 있다는 건가요?
api를 쓰시는데 저건 api에서 json 형태로 보내 주는 데이터 같은데 아닌가요?
ds.php에 들어있구요..
그런데 에러가 뜨네요
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/tnhands/public_html/board/ds/ds.php on line 11
이게 떠요...
이것들이 잘못된게아니고
$url = "http://http://api.openweathermap.org/date/2.5/weather?lat=37.56826&lon=126.977829%APPID=[1111111111111111111]"
이쪽이 잘못된거아니에요? 근데 그데로 한건데...
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
index.php에
<div class="m01">
<?php
include_once("./board/ds/ds.php");
?>
이런식으로 되어있구요