Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

PHP- file_exists()

Avatar of Desire2change
Desire2change asked on
PHPScripting Languages
20 Comments1 Solution2058 ViewsLast Modified:
Hello,

I am chking if a file exists or not using
file_exists function.

Now,
the filename is abc.JPG

in the code , it is checking for abc.jpg

while actually it is abc.JPG, so a difference in case.

This is just an example, there are many files which uses this function and all are chking for '.jpg' while all the images in the system have '.JPG' and some have '.jpg'
The fileexist is returning false because of this case difference , whereas it should return true.

Can anyone suggest me an easy way, so that without changing much I can make the file_exists function case insensitive ??

Please answer asap.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of albrieu
albrieuFlag of Argentina image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers