디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3600 |
nature1235
|
11개월 전 | 437 | |
| 3599 |
swallow
|
2년 전 | 1348 | |
| 3598 |
swallow
|
2년 전 | 1193 | |
| 3597 |
swallow
|
2년 전 | 797 | |
| 3596 | 2년 전 | 1416 | ||
| 3595 | 2년 전 | 695 | ||
| 3594 | 2년 전 | 1413 | ||
| 3593 |
|
3년 전 | 1237 | |
| 3592 |
|
3년 전 | 1572 | |
| 3591 |
|
3년 전 | 1485 | |
| 3590 |
|
3년 전 | 1443 | |
| 3589 |
|
3년 전 | 1244 | |
| 3588 |
|
3년 전 | 1224 | |
| 3587 |
|
4년 전 | 1139 | |
| 3586 |
|
4년 전 | 1372 | |
| 3585 |
|
4년 전 | 1294 | |
| 3584 |
|
4년 전 | 1038 | |
| 3583 |
Arm코리아
|
4년 전 | 1135 | |
| 3582 |
|
4년 전 | 1242 | |
| 3581 |
|
4년 전 | 2198 | |
| 3580 |
|
4년 전 | 1271 | |
| 3579 |
|
4년 전 | 1300 | |
| 3578 |
|
4년 전 | 1534 | |
| 3577 | 4년 전 | 1672 | ||
| 3576 |
|
4년 전 | 1663 | |
| 3575 |
|
4년 전 | 1673 | |
| 3574 |
|
4년 전 | 2092 | |
| 3573 |
|
4년 전 | 1549 | |
| 3572 |
|
4년 전 | 1536 | |
| 3571 |
|
4년 전 | 1615 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기