PHP: List all includes

后端 未结 3 1864
礼貌的吻别
礼貌的吻别 2020-12-09 20:37

I have a large complex PHP project made up of many PHP files.

Is there some function I can call in my code that will return a list of all included files?

3条回答
  •  半阙折子戏
    2020-12-09 20:55

    register_shutdown_function(
        function() {
            your_logger(get_included_files());
        }
    );
    

    get_included_files will be called at the end of script execution, so u`ll get full list of included files

提交回复
热议问题