this will throw an Error in a future version of PHP 포인트 랭킹 부분

this will throw an Error in a future version of PHP 포인트 랭킹 부분

QA

this will throw an Error in a future version of PHP 포인트 랭킹 부분

본문


<?php
$sql_common = " and mb_id != '{$config[cf_admin]}' "; //이부분과
$rank_rows = 15; //출력 수 
$sql = " select * from {$g5[member_table]} where mb_point > '{$row[mb_point]}' {$sql_common} order by mb_point desc, mb_today_login desc limit {$rank_rows} "; // 이 부분이 문제를 일으킵니다
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
    $rank = number_format($i + 1);
    //$rank_name = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
    $rank_name = $row['mb_nick'];
    $point = number_format($row['mb_point']);
    if ($rank == 1) {
        $rank_bg = ' rank_bg1';
    } else if ($rank == 2) {
        $rank_bg = ' rank_bg2';
    } else if ($rank == 3) {
        $rank_bg = ' rank_bg3';
    } else {
        $rank_bg = '';
    }
?>
    <li><span class="rank_bg<?php echo $rank_bg; ?>"><?php echo $rank; ?></span><?php echo $rank_name; ?><span class="rank_point"><?php echo $point; ?></span></li>
<?php } ?>

어떻게 해결해야 할까요?

php 7.2 이상에서 오류를 뱉습니다

이 질문에 댓글 쓰기 :

답변 1

this will throw an Error in a future version of PHP

이거 다음의 에러 로그를 보여 주세요. 그래야 진단이 가능합니다.

 

PHP7.2에서 사용되지 않는 전역 상수를 사용해서 그럴겁니다.

 

대부분 문자열의 따옴표 때문에 그렇더라구요....ㅠㅠ

Warning: Use of undefined constant cf_admin - assumed 'cf_admin' (this will throw an Error in a future version of PHP) in

Warning: Use of undefined constant member_table - assumed 'member_table' (this will throw an Error in a future version of PHP) in
Warning: Use of undefined constant mb_point - assumed 'mb_point' (this will throw an Error in a future version of PHP) in
이네요

답변을 작성하시기 전에 로그인 해주세요.
전체 123,524 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT