사이트 내 전체검색
PHP
유용한 함수 get_included_files
로빈아빠
https://cmd.kr/php/807 URL이 복사되었습니다.

본문

가끔 에디터로 프로그램 작업을 하다 보면
 
어떤 파일이 인클루드 되었는지 헷갈릴때가 있습니다.
그럴때 이전에 어떤 파일들이 include 나 require 되었는지 확인하는 함수 입니다.
 
get_included_files ? Returns an array with the names of included or required files
 
array get_included_files ( void )
Gets the names of all files that have been included using include()include_once()require() or require_once().
 
 
사용법
$included_files get_included_files();

foreach (
$included_files as $filename
) {
    echo 
"$filename\n"
;
}

댓글목록

등록된 댓글이 없습니다.

PHP
871 (4/18P)

Search

Copyright © Cmd 명령어 52.15.218.103