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년 전 | 4404 | ||
| 2454 |
|
1년 전 | 1124 | |
| 2453 | 1년 전 | 1057 | ||
| 2452 | 1년 전 | 1623 | ||
| 2451 | 1년 전 | 1155 | ||
| 2450 | 1년 전 | 960 | ||
| 2449 | 1년 전 | 1338 | ||
| 2448 | 1년 전 | 885 | ||
| 2447 | 1년 전 | 1340 | ||
| 2446 | 1년 전 | 1416 | ||
| 2445 | 1년 전 | 1130 | ||
| 2444 | 1년 전 | 1284 | ||
| 2443 | 1년 전 | 1679 | ||
| 2442 | 1년 전 | 1490 | ||
| 2441 | 1년 전 | 1072 | ||
| 2440 | 1년 전 | 1179 | ||
| 2439 | 1년 전 | 4622 | ||
| 2438 | 1년 전 | 1078 | ||
| 2437 | 1년 전 | 1119 | ||
| 2436 | 1년 전 | 928 | ||
| 2435 | 1년 전 | 1563 | ||
| 2434 | 1년 전 | 1456 | ||
| 2433 | 1년 전 | 1022 | ||
| 2432 |
|
1년 전 | 613267 | |
| 2431 |
|
1년 전 | 1098 | |
| 2430 |
|
1년 전 | 1708 | |
| 2429 | 1년 전 | 1313 | ||
| 2428 | 1년 전 | 1273 | ||
| 2427 | 1년 전 | 1150 | ||
| 2426 | 1년 전 | 1113 | ||
| 2425 |
뽕엄능브라
|
1년 전 | 1235 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기