Check if a file was included or loaded

后端 未结 12 1193
轻奢々
轻奢々 2020-12-08 13:35

Is there any elegant way to check if a file was included by using include/include_once/require/require_once or if the pag

12条回答
  •  北海茫月
    2020-12-08 13:52

    you can do this by get_included_files — Returns an array with the names of included or required files and validate against __FILE__

提交回复
热议问题