PHP: List all includes

后端 未结 3 1865
礼貌的吻别
礼貌的吻别 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 21:12

    get_included_files or get_required_files (alias of get_included_files)

    http://us.php.net/manual/en/function.get-included-files.php
    http://us.php.net/manual/en/function.get-required-files.php (Alias of get_included_files)

    
    
    -----
    The above example will output:
    
    abc.php
    test1.php
    test2.php
    test3.php
    test4.php
    

提交回复
热议问题