php 인클루드시 절대경로, 상대경로, include > php

본문 바로가기

php

php 인클루드시 절대경로, 상대경로, include

작성일 11-09-28 15:49

페이지 정보

작성자서방님 조회 379회 댓글 0건

본문

php를 인클루드 할 때 절대경로와 상대경로는 표기형식이 다르다.

 

cafe24 등에서 상대경로로 사용시
<? include "common/inc/header.php" ?>

 

하지만 이것을 절대경로로 바꾸게 되면 풀경로를 써야된다.


cafe24 등에서 절대경로로 사용시
<? include "/home/hosting_users/gallerywoncokr/www/common/inc/header.php" ?>

 

더 간단히 정리하면
<? include $_SERVER["DOCUMENT_ROOT"]."/common/inc/header.php";?>

댓글목록

등록된 댓글이 없습니다.

게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기