디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3421 |
프로프리랜서
|
13년 전 | 2101 | |
| 3420 |
SeanLee
|
13년 전 | 1928 | |
| 3419 | 13년 전 | 1956 | ||
| 3418 | 13년 전 | 2057 | ||
| 3417 | 13년 전 | 2476 | ||
| 3416 | 13년 전 | 4309 | ||
| 3415 | 13년 전 | 3680 | ||
| 3414 | 13년 전 | 3450 | ||
| 3413 |
crocojea
|
13년 전 | 2404 | |
| 3412 | 13년 전 | 2274 | ||
| 3411 | 13년 전 | 1674 | ||
| 3410 | 13년 전 | 1690 | ||
| 3409 |
|
13년 전 | 1948 | |
| 3408 | 13년 전 | 1226 | ||
| 3407 | 13년 전 | 1593 | ||
| 3406 | 13년 전 | 1381 | ||
| 3405 | 13년 전 | 2089 | ||
| 3404 | 13년 전 | 1589 | ||
| 3403 | 13년 전 | 1626 | ||
| 3402 | 13년 전 | 2191 | ||
| 3401 | 13년 전 | 1493 | ||
| 3400 |
|
13년 전 | 2178 | |
| 3399 |
임페리얼웹
|
13년 전 | 2241 | |
| 3398 |
임페리얼웹
|
13년 전 | 2575 | |
| 3397 |
원시인교주
|
13년 전 | 1391 | |
| 3396 | 13년 전 | 1603 | ||
| 3395 | 13년 전 | 1464 | ||
| 3394 | 13년 전 | 1374 | ||
| 3393 | 13년 전 | 1391 | ||
| 3392 | 13년 전 | 1401 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기