디렉토리의 모든 파일을 읽어 목록으로 만들기 입니다.
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;
}
게시판 목록
토크
개발과 관련된 어떤 얘기도 괜찮습니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3330 | 10년 전 | 2012 | ||
| 3329 | 10년 전 | 1487 | ||
| 3328 | 10년 전 | 1323 | ||
| 3327 |
mashmellow
|
10년 전 | 1947 | |
| 3326 | 10년 전 | 2556 | ||
| 3325 |
mixx애교
|
10년 전 | 1651 | |
| 3324 |
바람돌이팡
|
10년 전 | 1650 | |
| 3323 |
밥먹고합시다
|
10년 전 | 1478 | |
| 3322 |
플라이SINJI
|
10년 전 | 2972 | |
| 3321 |
개발짜증나
|
10년 전 | 2158 | |
| 3320 | 10년 전 | 1069 | ||
| 3319 | 10년 전 | 2755 | ||
| 3318 | 10년 전 | 2465 | ||
| 3317 |
개발짜증나
|
10년 전 | 1078 | |
| 3316 |
개발짜증나
|
10년 전 | 2309 | |
| 3315 | 10년 전 | 1689 | ||
| 3314 | 10년 전 | 1768 | ||
| 3313 |
mwdkim
|
10년 전 | 1781 | |
| 3312 |
mwdkim
|
10년 전 | 4697 | |
| 3311 | 10년 전 | 2392 | ||
| 3310 |
|
10년 전 | 1828 | |
| 3309 |
SeungYeon
|
10년 전 | 1676 | |
| 3308 |
아리마2001
|
10년 전 | 1474 | |
| 3307 |
|
10년 전 | 1241 | |
| 3306 | 10년 전 | 1998 | ||
| 3305 |
hyohyojj1234
|
10년 전 | 3092 | |
| 3304 |
ehdltdoit
|
10년 전 | 2386 | |
| 3303 | 10년 전 | 3278 | ||
| 3302 |
ILMare1003
|
10년 전 | 1865 | |
| 3301 |
|
10년 전 | 1890 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기