가계부 버젼업 스킨을 올렸는데 에러가 발생합니다. ㅜㅜ

가계부 버젼업 스킨을 올렸는데 에러가 발생합니다. ㅜㅜ

QA

가계부 버젼업 스킨을 올렸는데 에러가 발생합니다. ㅜㅜ

답변 2

본문

가계부 버젼업 https://sir.kr/g5_skin/6442 로 게시판을 만들었는데

 

 

Warning: number_format() expects parameter 1 to be float, string given in /volume1/web/skin/board/gagebu/list.php on line 24~25  에러가 발생합니다.

 

어디를 수정해야 할까요??? 초보자라서 .......

영카트 youngcart5.3.1.5 설치되어 있습니다.

 

<td class="td_board" ><? if($list[$i][wr_8] !=1) echo number_format($list[$i][wr_1], 0);  else echo "<div style='color:#ccc'>".number_format($list[$i][wr_6], 0)."</div>"?></td>
   <td class="td_board" style="color:red;"><?  if($list[$i][wr_8] !=1)  echo number_format($list[$i][wr_2], 0) ; else echo  "<div style='color:#ccc'>".number_format($list[$i][wr_7], 0)."</div>"?></td>

 

list.php 중에 에러 나오는 부분입니다.

아시는분 도움 요청드립니다. ㅎ

 

3024451739_1535916010.273.png

 

이 질문에 댓글 쓰기 :

답변 2

해당 필드가 문자형이라 그런 것 같습니다. 필드 값에 +0을 해주세요.

<td class="td_board" ><? if($list[$i][wr_8] !=1) echo number_format($list[$i][wr_1]+0, 0);  else echo "<div style='color:#ccc'>".number_format($list[$i][wr_6]+0, 0)."</div>"?></td>
<td class="td_board" style="color:red;"><?  if($list[$i][wr_8] !=1)  echo number_format($list[$i][wr_2]+0, 0) ; else echo  "<div style='color:#ccc'>".number_format($list[$i][wr_7]+0, 0)."</div>"?></td>

https://sir.kr/g5_skin/5210

 

댓글 보시면 list 파일에서

number_format($list[$i][wr_1]) 이것을, 

number_format($list[$i][wr_1], 0) 이렇게 변경하라고도 나와있네요.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
  • 질문이 없습니다.
전체 8
© SIRSOFT
현재 페이지 제일 처음으로