Example of the get_included_files method used by PHP to determine whether a file is introduced,

Source: Internet
Author: User

Example of the get_included_files method used by PHP to determine whether a file is introduced,

This example describes the usage of get_included_files in PHP to determine whether a file is introduced. We will share this with you for your reference. The details are as follows:

<? Php // This file is abc. phpinclude '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" ;}?>

Result:

The above routine will output:

abc.phptest1.phptest2.phptest3.phptest4.php

View phpcms file loading

D:\xampp\htdocs\duanzu\index.phpD:\xampp\htdocs\duanzu\phpcms\base.phpD:\xampp\htdocs\duanzu\phpcms\libs\functions\global.func.phpD:\xampp\htdocs\duanzu\phpcms\libs\functions\extention.func.phpD:\xampp\htdocs\duanzu\phpcms\libs\functions\autoload\plugin.func.phpD:\xampp\htdocs\duanzu\phpcms\libs\functions\autoload\video.func.phpD:\xampp\htdocs\duanzu\caches\configs\system.phpD:\xampp\htdocs\duanzu\phpcms\libs\classes\application.class.phpD:\xampp\htdocs\duanzu\phpcms\libs\classes\param.class.phpD:\xampp\htdocs\duanzu\caches\configs\route.phpD:\xampp\htdocs\duanzu\phpcms\modules\home\common.phpD:\xampp\htdocs\duanzu\phpcms\model\user_model.class.phpD:\xampp\htdocs\duanzu\phpcms\libs\classes\model.class.phpD:\xampp\htdocs\duanzu\phpcms\libs\classes\db_factory.class.phpD:\xampp\htdocs\duanzu\caches\configs\database.phpD:\xampp\htdocs\duanzu\phpcms\libs\classes\db_mysqli.class.phpD:\xampp\htdocs\duanzu\phpcms\libs\classes\sendsms.class.phpD:\xampp\htdocs\duanzu\phpcms\plugin\Taobao\TopSdk.phpD:\xampp\htdocs\duanzu\phpcms\plugin\Taobao\Autoloader.php

Ability to snoop the project loading process!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.