태

질문..

최상의 폴더의 index.php 에서 <?php include '/home/index.php'; ?> 이렇게하면...

Warning: include(/home/index.php) [function.include]: failed to open stream: No such file or directory in /WEB/torrent/html/index.php on line 2

Warning: include() [function.include]: Failed opening '/home/index.php' for inclusion (include_path='.:/usr/local/php/lib/php') in /WEB/torrent/html/index.php on line 2


이렇게 뜨는데...

따른 설정을 해 주어야 하나요?
|

댓글 2개

/home/index.php 이렇게 한다면 절대경로기 때문에 리눅스 상의 /home디렉토리 하위의 index.php
를 찾습니다

/home 하위는 보통 유저 아이디나 디랙토리가 존제 하기때문에 아마 저 인덱스 페이지가 없을껄로 보입니다

$_SERVER['DOCUMENT_ROOT']."/index.php" 이런식으로 한번 해보시죠 아니면 해당 파일의 상대경로로 지정하시거나
<?php include '/home/index.php'; ?> 처럼 사용하고자 하신다면
상대경로 : <?php include './home/index.php'; ?>
절대경로 : <?php include '/WEB/torrent/html/home/index.php'; ?>
2가지 방법중에서 상대경로를 사용하실것을 권합니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
12-02-16 조회 1,069
12-02-16 조회 1,349
12-02-16 조회 1,655
12-02-16 조회 1,104
12-02-16 조회 1,084
12-02-16 조회 1,643
12-02-16 조회 2,118
12-02-16 조회 1,098
12-02-16 조회 1,658
12-02-16 조회 1,711
12-02-16 조회 1,667
12-02-16 조회 1,697
12-02-16 조회 929
12-02-16 조회 1,410
12-02-16 조회 1,178
12-02-16 조회 1,648
12-02-16 조회 1,950
12-02-16 조회 1,076
12-02-16 조회 1,647
12-02-16 조회 1.5만