If your php programs are creating files in a specific directory, Your developers should use
strtolower() and strtoupper() functions to avoid conflicts.
When a php program is going to create a file in any direcotry, use
strtolower function. It returns string with all alphabetic characters converted to lowercase.
It avoids lower case upper case conflict between files.
I am giving you a example of this, here is a php programs. it creates file testfile.txt in /tmp directory
Code:
<?php
$ourFileName = "/tmp/TeStFile.Txt";
$ourFileName = strtolower($ourFileName );
if (file_exists("$ourFileName")) {
echo "The file exists";
} else {
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
echo "file created";
}
?>
I have defined that file should be created as
TeStFile.Txt in /tmp directory
$ourFileName = "/tmp/TeStFile.Txt";
but in very next line, I have defined that all letters of filename should be converted into lower case
$ourFileName = strtolower($ourFileName );
So if you have filename TEStFile.TXT, TEStFilE.Txt, TESTFILE.TXT or anything including capital letters in the code, it will convert it into lower case letters.
If you do not have this file in directory, it will create the file in /tmp and next time when you run the script again, it will give the "file already exists". The program will not create same file name with different case.