디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
function listFile($dir, $file_type)
{
chdir($dir);
if (!$file_type)
$ls_str = " ls -R * ";
else
$ls_str = " ls -R *." . $file_type;
$fp = popen($ls_str, "r");
while(!feof($fp)){
$line = fgets($fp,50);
$line = trim($line);
if(substr($line,strlen($line)-1,1) == ":"){ //디렉토리 처리부분
$subdir = $line;
$subdir = substr($subdir,0,strlen($line)-1) . "/";
}
$htmlfile = explode(".",$line); //html파일 처리부분
if($htmlfile[1] == "html"){
$fullpath = $subdir . $line;
}
}
pclose($fp);
return $fullpath;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3480 |
|
8년 전 | 4317 | |
| 3479 | 8년 전 | 15824 | ||
| 3478 | 9년 전 | 2398 | ||
| 3477 | 9년 전 | 2943 | ||
| 3476 | 9년 전 | 3124 | ||
| 3475 | 9년 전 | 3521 | ||
| 3474 | 9년 전 | 2463 | ||
| 3473 | 9년 전 | 3034 | ||
| 3472 | 9년 전 | 2369 | ||
| 3471 | 9년 전 | 2340 | ||
| 3470 |
디자이너플러스
|
9년 전 | 2339 | |
| 3469 | 9년 전 | 2702 | ||
| 3468 | 9년 전 | 3502 | ||
| 3467 | 9년 전 | 3736 | ||
| 3466 | 9년 전 | 2484 | ||
| 3465 | 9년 전 | 2515 | ||
| 3464 |
프로그래머7
|
9년 전 | 1828 | |
| 3463 | 9년 전 | 2102 | ||
| 3462 | 9년 전 | 3048 | ||
| 3461 |
|
10년 전 | 3197 | |
| 3460 | 10년 전 | 2168 | ||
| 3459 | 10년 전 | 3223 | ||
| 3458 | 10년 전 | 4025 | ||
| 3457 | 10년 전 | 4665 | ||
| 3456 |
dethos79
|
10년 전 | 5095 | |
| 3455 | 11년 전 | 4596 | ||
| 3454 | 11년 전 | 3572 | ||
| 3453 | 11년 전 | 6598 | ||
| 3452 |
gooroo
|
11년 전 | 2611 | |
| 3451 | 11년 전 | 2567 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기