./_common.php 로딩 시 Warning이 뜨는데요... 채택완료
dd.php 에서 common.php를 인클루드 할 때 아래와 같이 warning이 발생
====> include_once("../_common.php") ; 정상
....
Warning: include_once(./_common.php): failed to open stream: No such file or directory in /home/public_html/req/dd.php on line 2 Warning: include_once(): Failed opening './_common.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /home/public_html/req/dd.php on line 2
dd.php 내에서 include_once("../_common.php") ; 변경하면 warning 안 뜨고 정상적으로 처리됨
하지만, dd.php에서 다른 함수를 사용(예를 들어 bbs/alert.php)하면
사용하는 alert 함수 내부에서 ./common.php 을 인클루드 함으로 또 Warning이 뜸
/bbs/alert.php
include_once('./_common.php');
인클루드 할때 어떻게 해야할지???
답변 2개
./_common.php 파일의 소스가 잘못된 듯하네요..
../_common.php 와 비교했을때..
common.php 를 불러오는 경로를 바꿔줘야 합니다.
해보시고 잘 모르시면 두 파일의 소스를 올려보세요..
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인