디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3511 | 7년 전 | 2426 | ||
| 3510 | 7년 전 | 2785 | ||
| 3509 | 8년 전 | 3602 | ||
| 3508 |
좋은사람우유
|
8년 전 | 4883 | |
| 3507 | 8년 전 | 5060 | ||
| 3506 | 8년 전 | 3444 | ||
| 3505 | 8년 전 | 3014 | ||
| 3504 | 8년 전 | 4031 | ||
| 3503 | 8년 전 | 3785 | ||
| 3502 | 8년 전 | 4238 | ||
| 3501 | 8년 전 | 2975 | ||
| 3500 |
|
8년 전 | 2755 | |
| 3499 |
|
8년 전 | 3198 | |
| 3498 |
|
8년 전 | 2788 | |
| 3497 | 8년 전 | 2954 | ||
| 3496 | 8년 전 | 3003 | ||
| 3495 |
|
8년 전 | 1328 | |
| 3494 |
|
8년 전 | 2436 | |
| 3493 | 8년 전 | 2088 | ||
| 3492 |
체리맛쿠키
|
8년 전 | 2560 | |
| 3491 |
제임스딘님
|
8년 전 | 1875 | |
| 3490 | 8년 전 | 1721 | ||
| 3489 |
tiadk
|
8년 전 | 3283 | |
| 3488 |
동팔이22
|
8년 전 | 2221 | |
| 3487 |
초등학교학생
|
8년 전 | 1826 | |
| 3486 |
|
8년 전 | 3353 | |
| 3485 | 8년 전 | 2472 | ||
| 3484 | 8년 전 | 2619 | ||
| 3483 | 8년 전 | 4562 | ||
| 3482 | 8년 전 | 9176 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기