1
가능한 복제를 파일 및 디렉토리 목록을 가져 오는 방법 :
PHP list of specific files in a directory특정 디렉토리에
내 디렉토리에 거기에있는 모든 디렉토리와 파일을 나열합니다. 내가 어떻게 할 수 있니? 다음은 내 코드
if(opendir("user_files/".$uid."/")) {
var_dump(readdir("user_files/".$uid."/"));
}
사용을 사용하여 폴더에있는 파일을 나열하는 또 다른 방법이다 [글로브()] (http://php.net/manual/en/function. glob.php) 그것의 쉬운 –
[scandir] (http://php.net/manual/en/function.scandir.php) 잘 작동 – Baba
[scandir] (http://us3.php.net/manual/ko/) function.scandir.php)이 정확히 이것을합니다. –