디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3270 | 11년 전 | 2679 | ||
| 3269 | 11년 전 | 1843 | ||
| 3268 | 11년 전 | 2289 | ||
| 3267 |
kiplayer
|
11년 전 | 1790 | |
| 3266 |
초심의설렘
|
11년 전 | 3004 | |
| 3265 | 11년 전 | 1817 | ||
| 3264 | 11년 전 | 1707 | ||
| 3263 | 9년 전 | 656 | ||
| 3262 |
커네드커네드
|
9년 전 | 623 | |
| 3261 | 9년 전 | 706 | ||
| 3260 | 9년 전 | 734 | ||
| 3259 |
|
9년 전 | 1154 | |
| 3258 | 9년 전 | 2886 | ||
| 3257 | 9년 전 | 1163 | ||
| 3256 | 9년 전 | 876 | ||
| 3255 |
star3840
|
9년 전 | 614 | |
| 3254 | 9년 전 | 608 | ||
| 3253 | 9년 전 | 807 | ||
| 3252 | 9년 전 | 897 | ||
| 3251 | 9년 전 | 688 | ||
| 3250 | 9년 전 | 706 | ||
| 3249 | 9년 전 | 842 | ||
| 3248 | 9년 전 | 1510 | ||
| 3247 | 9년 전 | 3150 | ||
| 3246 | 9년 전 | 1355 | ||
| 3245 |
|
9년 전 | 1422 | |
| 3244 | 9년 전 | 1335 | ||
| 3243 | 9년 전 | 788 | ||
| 3242 | 9년 전 | 1427 | ||
| 3241 | 9년 전 | 832 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기