채택완료

php 및 mysql 변경 후 에러 어떻게 해결해야 하나요?

웹호스팅 업체 미리내에 요청했어요.

 

php 5.5 / mysql 5.5 이 부분을 

php 7.2 /mariadb 10.4 이렇게 변경했습니다.

 

그런데 아래와 같은 에러가 발생합니다.

어떻게 해결을 해야하나요

감사합니다.

 

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /web/home/kht/html/theme/purewhite_wide/skin/board/product/view.skin.php on line 45

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /web/home/kht/html/theme/purewhite_wide/skin/board/product/view.skin.php on line 45

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /web/home/kht/html/theme/purewhite_wide/skin/board/product/view.skin.php on line 80

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /web/home/kht/html/theme/purewhite_wide/skin/board/product/view.skin.php on line 80

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /web/home/kht/html/theme/purewhite_wide/skin/board/product/view.skin.php on line 82

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /web/home/kht/html/theme/purewhite_wide/skin/board/product/view.skin.php on line 82

 

 

|

답변 5개

채택된 답변
+20 포인트

너무 많이 건너뛰셨네요..

저것 뿐만 아니라 다른 오류가 더 뜰것 같습니다...

답변 감사합니다.

 

php 버전이 바뀌면서 배열 값에는 무조건 ' 해당 부분으로 감싸줘야 오류가 발생 안됩니다.

혹시 아래처럼 수정을 해보시겠어요?

 

// 변경 전 if ($row[file]) // 변경 후 if ($row['file'])

if($row['file'] == 'file') {

 

 

 

각 에러 위치 찾아가 배열키 부분에 따옴표 넣어주시면 될 듯..

(예) $arr[key] --> $arr['key']

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