디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3361 |
|
9년 전 | 884 | |
| 3360 | 9년 전 | 1222 | ||
| 3359 |
kiplayer
|
9년 전 | 990 | |
| 3358 | 9년 전 | 853 | ||
| 3357 |
커네드커네드
|
9년 전 | 989 | |
| 3356 |
|
9년 전 | 1603 | |
| 3355 | 9년 전 | 1343 | ||
| 3354 | 9년 전 | 1130 | ||
| 3353 | 9년 전 | 1215 | ||
| 3352 | 9년 전 | 1878 | ||
| 3351 | 9년 전 | 3617 | ||
| 3350 | 9년 전 | 1462 | ||
| 3349 | 9년 전 | 1496 | ||
| 3348 | 9년 전 | 1282 | ||
| 3347 |
|
9년 전 | 1308 | |
| 3346 |
|
10년 전 | 1321 | |
| 3345 | 10년 전 | 2590 | ||
| 3344 | 10년 전 | 1268 | ||
| 3343 |
Tosea
|
10년 전 | 2788 | |
| 3342 | 10년 전 | 1173 | ||
| 3341 |
비긴어게인
|
10년 전 | 1671 | |
| 3340 | 10년 전 | 1894 | ||
| 3339 | 10년 전 | 2478 | ||
| 3338 | 10년 전 | 1412 | ||
| 3337 | 10년 전 | 2166 | ||
| 3336 | 10년 전 | 2295 | ||
| 3335 | 10년 전 | 2272 | ||
| 3334 | 10년 전 | 2140 | ||
| 3333 | 10년 전 | 2292 | ||
| 3332 | 10년 전 | 1957 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기