PHP 4.0 Bug #6078 Updated: Make get_included/required_files() work even if files do not end i .php

From: Date: Mon, 18 Sep 2000 01:43:29 +0000
Subject: PHP 4.0 Bug #6078 Updated: Make get_included/required_files() work even if files do not end i .php
Groups: php.dev 
Request: Send a blank email to php-dev+get-33402@lists.php.net to get a copy of this message
ID: 6078 Updated by: stas Reported By: marten@jerbro.se Status: Closed Bug Type: Scripting Engine problem Assigned To: Comments: Should be fixed in latest CVS. Previous Comments: --------------------------------------------------------------------------- [2000-08-10 17:02:35] stas@php.net Oh, sorry - seems that this insanity is indeed in the code. I just didn't look well enough (being sure this couldn't be there). I hope new include/require code will fix that, but in the meantime I reclassify this as a bug. --------------------------------------------------------------------------- [2000-08-10 16:54:48] marten@jerbro.se Sorry if my explanation was fuzzy. What i meant is this; in the snippet below get_included_files() returns an empty array because the required files do not end in .php. <? require_once('global.inc'); require_once('sess.class'); require_once('banner.class'); require_once('cache.class'); require_once('template.class'); var_dump(get_required_files()); ?> From the manual page for get_required_files(); "As of PHP 4.0.1pl2 this function assumes that the required_once files end in the extension '.php', other extensions do not work." --------------------------------------------------------------------------- [2000-08-10 16:46:33] stas@php.net the four characters ".php" has no magical meaning, so every function that works with files works with whatever names they have. --------------------------------------------------------------------------- [2000-08-10 16:41:16] marten@jerbro.se Is it possible to make get_included_files() and get_required_files() to work even if the files included/required does not end with .php? --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6078

« previous php.dev (#33402) next »