include_once("./_common.php"); 대체하기
_common.php을 만들지 않고 아래 코드를 직접 넣어서 사용.
또는 _common.php의 내용에 넣어서 사용.
[code]
<?php
function find_common_php() {
$current_dir = dirname(__FILE__);
$parent_dir = "../";
$count = 0;
while (!file_exists($current_dir . "/common.php")) {
$current_dir = dirname($current_dir);
$count++;
if ($current_dir === '/' || $current_dir === '.') {
break;
}
}
return $count;
}
$up_count = find_common_php();
$include_path = str_repeat('../', $up_count) . 'common.php';
include_once($include_path);
[/code]
댓글 10개
2년 전
들레아빠님두 이제 본인이 원하는 사용자함수를 만들어서 사용하시네요.^^
추천박고 갑니다.
추천박고 갑니다.
2년 전
추천 격려 감사 합니다.
DawnDew
2년 전
오 감사합니다
2년 전
@DawnDew 감사 합니다.
marty72
2년 전
역시 고수님들의 세계란.. 공유 감사드립니다. 추천꾹!
2년 전
@marty72 추천 감사 합니다.
민트다이어리
2년 전
감사합니다. ^^
2년 전
민트다이어리님 감사합니다.
2년 전
감사합니다.
KIMHA
1년 전
감사합니다~!!
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4429 | ||
| 2394 | 1년 전 | 5052 | ||
| 2393 |
|
1년 전 | 1702 | |
| 2392 |
|
1년 전 | 1360 | |
| 2391 |
|
1년 전 | 1142 | |
| 2390 |
|
1년 전 | 1199 | |
| 2389 | 1년 전 | 1781 | ||
| 2388 | 1년 전 | 1330 | ||
| 2387 | 1년 전 | 1312 | ||
| 2386 |
투명한열정
|
1년 전 | 3076 | |
| 2385 |
|
1년 전 | 2348 | |
| 2384 | 1년 전 | 1670 | ||
| 2383 | 1년 전 | 1807 | ||
| 2382 | 1년 전 | 1456 | ||
| 2381 |
|
1년 전 | 1874 | |
| 2380 | 1년 전 | 1044 | ||
| 2379 | 1년 전 | 1385 | ||
| 2378 | 1년 전 | 919 | ||
| 2377 | 1년 전 | 2999 | ||
| 2376 | 1년 전 | 1565 | ||
| 2375 | 1년 전 | 1737 | ||
| 2374 |
네이비스택
|
1년 전 | 1118 | |
| 2373 | 1년 전 | 1550 | ||
| 2372 | 1년 전 | 1472 | ||
| 2371 |
goodman148
|
1년 전 | 2112 | |
| 2370 | 1년 전 | 1521 | ||
| 2369 |
|
1년 전 | 1035 | |
| 2368 | 1년 전 | 1838 | ||
| 2367 | 1년 전 | 1358 | ||
| 2366 |
|
1년 전 | 1214 | |
| 2365 | 1년 전 | 2146 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기