|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-25 13:23 UTC] sniper@php.net
[2004-01-14 17:52 UTC] matbtt at web dot de
[2004-01-14 19:23 UTC] kennyt@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 08:00:01 2025 UTC |
Description: ------------ Using get_included_files() function returns an array of included/required files *plus* the file being accessed via the url. When reading the manual -> Returns an array of the names of all files that have been included using include(), include_once(), require() or require_once() So going strictly by that, this extra file shouldn't be in the result array. I came across similar reports in the bugs database, but they all suggest that the problem was fixed. Thanks for your time Reproduce code: --------------- a.php ---- <?php ?> b.php ---- <?php include('./a.php'); var_dump(get_included_files()); ?> Expected result: ---------------- When viewing b.php, I should be getting -> array(1) { [0]=> string(27) "/files/www/data/crash/a.php" } Actual result: -------------- When viewing b.php, Im getting -> array(2) { [0]=> string(27) "/files/www/data/crash/b.php" [1]=> string(27) "/files/www/data/crash/a.php" }