서브페이지 head와 tail 경로 문의 드립니다^^
본문
서브 폴더에 있는 페이지에도 최상단에 있는 head와 tail파일을 include해서 동일하게 사용하고 싶습니다.
그래서 테스트삼아 루트에 있는 index.php파일을 test라는 서브 폴더에 넣고 열여봤더니 아래와 같이 경로 오류가 나오네요.
서브폴더에 있는 페이지에도 루트에 있는 head와 tail파일을 동일하게 사용하려면 어떻게 하면 되는지요?
선배님들의 답변 좀 부탁 드립니다.^^
Warning: include_once() [function.include-once]: URL file-access is disabled in the server configuration in /home/hosting_users/xidc_atpetfood/www/test/index.php on line 3
Warning: include_once(http://atpetfood.xidc.co.kr/_common.php) [function.include-once]: failed to open stream: no suitable wrapper could be found in /home/hosting_users/xidc_atpetfood/www/test/index.php on line 3
Warning: include_once() [function.include]: Failed opening 'http://atpetfood.xidc.co.kr/_common.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/xidc_atpetfood/www/test/index.php on line 3
Warning: include_once(G5_MOBILE_PATH/index.php) [function.include-once]: failed to open stream: No such file or directory in /home/hosting_users/xidc_atpetfood/www/test/index.php on line 14
Warning: include_once() [function.include]: Failed opening 'G5_MOBILE_PATH/index.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/hosting_users/xidc_atpetfood/www/test/index.php on line 14
답변 1
루트에 보면
_head.php와 _tail.php 가 있습니다.
그 화일을 test폴더에 복사하세요...
그리고 다시 열어보세요...
물론 index.php화일 상단과 하단을 수정안했다는 가정하에...
include_once('./_head.php');
include_once('./_tail.php');