Ask a Question related to PHP Development, Design and Development.
-
ulysses at mail dot fitan dot com dot tw #1
#25381 [Bgs]: include_once failed to recognize identical file
ID: 25381
User updated by: ulysses at mail dot fitan dot com dot tw
Reported By: ulysses at mail dot fitan dot com dot tw
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows 2K, IIS5
PHP Version: 4.3.3
New Comment:
Do you mean this ?> RTFM: [url]http://www.php.net/include_once[/url]
How convenient!> Note: Be aware, that the behaviour of include_once()
> and require_once() may not be what you expect on a
> non case sensitive operating system (such as Windows).
Then please tell me, WHAT CAN I EXPECT ?
My code runs well on 4.30, and crashed when my client
upgrade their system to 4.33, can I tell me client to RTFM
?
I just demand for a notice message, or do you want Windows
developers to build a included_file_array by their self in
all code ?
No wonder why there are so few enterprises who would adopt
PHP for critical task. Cause it can not be EXPECTED!
Previous Comments:
------------------------------------------------------------------------
[2003-09-03 10:48:11] [email]sniper@php.net[/email]
RTFM: [url]http://www.php.net/include_once[/url]
------------------------------------------------------------------------
[2003-09-03 10:00:15] ulysses at mail dot fitan dot com dot tw
Description:
------------
In PHP 4.3.3 include_once() is case-sensitive. This will
cause some problem on case-insensitive filesystems, such as
Windows. Please see the reproduce code.
Of course I will never use this teenager-hacker-style
strings for actual coding, but it means trouble when mixed
using relative and absolute path within codes. I spent
hours debugging, only to found it's the "I"netpub directory
(IIS default setting) name problem.
Yes, this problem can be work-around. But if include_once()
feels that 'C:/Inetpub/wwwroot/b.php' and 'c:/inetpub/
wwwroot/b.php' are different, please do not let me include
it, or please give me some warning.
This had never happened in PHP 4.3.2 or previous version.
Reproduce code:
---------------
I've got two files: a.php & b.php, which are put in the same directory.
The actual absolute to b.php is 'C:/Inetpub/wwwroot/b.php';
a.php:
<?
$mydir = 'c:/inEtpUB/wwwRoOT';
echo "<P>THIS IS A.PHP";
include_once("b.php");
include_once("$mydir/b.php");
?>
b.php
<?
echo "<P>THIS IS B.PHP";
?>
Expected result:
----------------
THIS IS A.PHP
THIS IS B.PHP
Actual result:
--------------
THIS IS A.PHP
THIS IS B.PHP
THIS IS B.PHP
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=25381&edit=1[/url]
ulysses at mail dot fitan dot com dot tw Guest
-
#37766 [Opn->Fbk]: include_once() adds file more than one time
ID: 37766 Updated by: tony2001@php.net Reported By: boris_k at iname dot com -Status: Open +Status: ... -
How to recognize the locked PDF-file?
Hello! I need to overload the standard Acrobat message that the document is opened by another application which appears on saving the document.... -
include_once() - always included?
Hi All, Always looking for efficiency, consider the following code: <?php function one($arg){ if ($arg == 1){ include_once(...); do some... -
How identical is a disk mirror?
It should boot as normal. Regards, Eddie <mschloh@netscape.net> wrote in message news:Czgcb.1$PN4.2021@news.ecrc.de... I -
Question about Include_once
Does file called by "Include_once" stay with the client's session or just for operations in the page where it is stated? For example, assume I...



Reply With Quote

