본문 바로가기

Study/PHP

[php] 메인접속시 가장 최근에 수정된 파일로 자동 접속하기

index.php를 아래와 같이 설정해주면 된다. 디버깅 작업시 일일이 파일경로를 입력하지 않아도 되어 유용하다.

원출처: stackoverflow.com/questions/9371944/php-how-to-get-most-recent-file-from-directory-and-subdirectories

 

PHP - how to get most recent file from directory AND subdirectories

I have used the following script to correctly display ALL files from the selected directory and its sub-directories. Does anyone know how to modify this code only echo the most recent file across the

stackoverflow.com