Re: [PHP] Case-Insensitive include on linux.

2006-01-11 Thread Marco Kaiser
Hi,

this is very stupid because you can have files in a directory named:

PleaSeINCLUDeMe.php
pleaseincludeme.php

and if you do a case insensitive include which one should be included?
The include stuff works insensitive under windows great because the
filesystem does not permit 2 file with the same name in a directory.
The example above is not possible.

-- Marco

2006/1/11, Albert [EMAIL PROTECTED]:

 Mathijs wrote:
  Is there a way to have include() be case-insensitive?
 Linux file systems are case sensitive. The include() and require()
 functions
 try to open the file specified. If you enter the wrong case the file
 system
 will return that the file does not exist.

 Albert

 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.371 / Virus Database: 267.14.17/226 - Release Date:
 2006/01/10


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
Marco Kaiser


RE: [PHP] Case-Insensitive include on linux.

2006-01-11 Thread George Pitcher
Mathijs wrote:

 Is there a way to have include() be case-insensitive?

If you are know that all your file and directory names are lower case, but
users may input mixed case responses that will be used to determine the
include, you can set the case of the user input to lower case with
strtolower(). Or strtoupper() - the choice is yours.

If you have been a bit careless in naming your directories or filenames,
then I'd do some site maintenance and get that sorted first.

George

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Case-Insensitive include on linux.

2006-01-11 Thread Mathijs

George Pitcher wrote:

Mathijs wrote:


Is there a way to have include() be case-insensitive?


If you are know that all your file and directory names are lower case, but
users may input mixed case responses that will be used to determine the
include, you can set the case of the user input to lower case with
strtolower(). Or strtoupper() - the choice is yours.

If you have been a bit careless in naming your directories or filenames,
then I'd do some site maintenance and get that sorted first.

George


Owkay, its clear :).
I just wondered if it was possible, would save some other trouble :).

Thx for the help.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Case-Insensitive include on linux.

2006-01-10 Thread Albert
Mathijs wrote:
 Is there a way to have include() be case-insensitive?
Linux file systems are case sensitive. The include() and require() functions
try to open the file specified. If you enter the wrong case the file system
will return that the file does not exist.

Albert

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/226 - Release Date: 2006/01/10
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php