PHP: Перечислите все включает

def num(s):
    try:
        return int(s)
    except ValueError:
        return float(s)
7
задан Liam 20 August 2009 в 16:30
поделиться

2 ответа

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 (псевдоним get_included_files)

<?php
// This file is 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";
}
?>

-----
The above example will output:

abc.php
test1.php
test2.php
test3.php
test4.php
21
ответ дан 6 December 2019 в 07:27
поделиться
1
ответ дан 6 December 2019 в 07:27
поделиться
Другие вопросы по тегам:

Похожие вопросы: