阅读背景:

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";
}

?>
<?php
// 本文件是 abc.php

include 'test1.php';
inc



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: