분류
php
chdir () 함수는 파일 디렉토리로 변경됩니다.
본문
코드 :
$newdir = "book";
chdir($newdir) or die("Could not change to directory ($newdir)");
$dh = opendir('.');
print "Files:";
while ($file = readdir($dh)) :
print "$file
";
endwhile;
closedir($dh);
- 이전글chop () 함수는 끝나는 공백과 줄 바꿈을 제외한 문자열을 반환합니다. 18.01.06
- 다음글string addslashes (string str)는 더 많은 슬래시를 추가합니다. 18.01.06