테스트 사이트 - 개발 중인 베타 버전입니다

G5_URL G5_PATH 같은 것을 추가하여 인클루드에 사용하는 방법 채택완료

매콤달콤 10년 전 조회 8,198

config.php 파일에에서 include폴더를 DIR, URL, PATH를 등록해놓고서

 

<?php include_once(G5_SHOP_SKIN_PATH.'/boxcart.skin.php'); >

 

기존에 이렇게 되어있는 부분에서  

 

<?php include_once(G5_INCLUDE_PATH.'/파일명.php'); >

 

이런식으로 인클루드를 수정하려고하면 자꾸 에러가 뜨네요.. 방법이 잘못된걸까요?

이미지 불러올때는 URL부분을 이용하여 잘 적용이 되는데 왜 인클루드로 파일을 불러오려하면 안되는건지 ㅠㅠ


에러문구입니다.

 

Warning: include_once() [http://localhost/itr/shop/function.include-once">function.include-once]: URL file-access is disabled in the server configuration in C:\APM_Setup\htdocs\project\shop\shop.head.php on line 90

Warning: include_once(http://localhost/project/include/">http://localhost/project/include/파일명.php) [http://localhost/itr/shop/function.include-once">function.include-once]: failed to open stream: no suitable wrapper could be found in C:\APM_Setup\htdocs\project\shop\shop.head.php on line 90

Warning: include_once() [http://localhost/itr/shop/function.include">function.include]: Failed opening 'http://localhost/project/include/">http://localhost/project/include/파일명.php' for inclusion (include_path='.') in C:\APM_Setup\htdocs\project\shop\shop.head.php on line 90

 

 

 

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

답변 1개

채택된 답변
+20 포인트
P
10년 전

URL file-access is disabled in the server configuration

이 에러메시지는 allow_url_open 이 off로 되어있을때 URL을 통한 include나 fopen 등의 함수를 이용할 경우 발생합니다.  

echo G5_INCLUDE_PATH; 를 해보시고 URL이 아닌 절대경로를 이용하여 인클루드 할 수 있도록 수정해주세요.

개인적으로는 G5_PATH 상수를 추천드립니다. 

로그인 후 평가할 수 있습니다

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

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

로그인