디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 31 | 17년 전 | 2789 | ||
| 30 |
nooree
|
17년 전 | 1644 | |
| 29 |
|
17년 전 | 2152 | |
| 28 | 17년 전 | 2327 | ||
| 27 | 17년 전 | 3803 | ||
| 26 | 17년 전 | 2942 | ||
| 25 | 17년 전 | 2113 | ||
| 24 | 17년 전 | 2058 | ||
| 23 | 17년 전 | 1975 | ||
| 22 |
|
17년 전 | 2175 | |
| 21 | 17년 전 | 1742 | ||
| 20 | 17년 전 | 2217 | ||
| 19 |
사랑합니다
|
17년 전 | 1708 | |
| 18 | 17년 전 | 4076 | ||
| 17 | 17년 전 | 2906 | ||
| 16 |
|
17년 전 | 1740 | |
| 15 |
심심맨닷컴
|
17년 전 | 1999 | |
| 14 | 17년 전 | 2051 | ||
| 13 | 17년 전 | 2464 | ||
| 12 | 17년 전 | 1944 | ||
| 11 |
심심맨닷컴
|
17년 전 | 1850 | |
| 10 | 17년 전 | 2552 | ||
| 9 |
eclub
|
17년 전 | 2307 | |
| 8 | 17년 전 | 2468 | ||
| 7 | 17년 전 | 2117 | ||
| 6 |
stuartkim
|
17년 전 | 2540 | |
| 5 |
stuartkim
|
17년 전 | 2203 | |
| 4 | 17년 전 | 2028 | ||
| 3 |
사랑과우정
|
17년 전 | 5009 | |
| 2 | 17년 전 | 3144 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기