News新闻

业界新闻动态、技术前沿
Who are we?

您的位置:首页      乐道系统FAQ      PHP判断文件是否被引入的方法get_included_files用法示例

PHP判断文件是否被引入的方法get_included_files用法示例

发布日期:2016-11-29 00:00:00 57

本文实例讲述了PHP判断文件是否被引入的方法get_included_files用法。分享给大家供大家参考,具体如下:

<?php
// 本文件是 abc.php
include 'test1.php';
include_once 'test2.php';
require 'test3.php';
require_once 'test4.php';
$included_files = get_included_files();
foreach ($included_files as $filename) {
  echo "$filename\n";
}
?>