
get_included_files 함수는 PHP에서 포함된 파일의 목록을 반환하는 함수입니다. 하지만, include_once 또는 require_once 함수를 사용하여 포함된 파일이 여러 번 호출되는 경우, get_included_files 함수는 호출된 파일의 목록을 반환합니다.
예를 들어, A.php 파일에서 B.php 파일을 include_once로 호출하고, C.php 파일에서 B.php 파일을 다시 include_once로 호출하는 경우, get_included_files 함수는 A.php, B.php, C.php 파일의 목록을 반환합니다.
이러한 결과는 include_once 또는 require_once 함수가 파일을 한 번만 포함시키기 때문에, get_included_files 함수가 호출된 파일의 목록을 반환하는 것입니다.
get_included_files 함수는 PHP의 include_once 또는 require_once 함수의 특성에 따라 동작합니다. 따라서, include_once 또는 require_once 함수를 사용하여 포함된 파일이 여러 번 호출되는 경우, get_included_files 함수는 호출된 파일의 목록을 반환합니다.
2025-08-15 06:09