Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 481625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:00:48+00:00 2026-05-13T01:00:48+00:00

I need is_dir() to don’t care about if the folder or the argument is

  • 0

I need is_dir() to don’t care about if the folder or the argument is upper or lower case, or a mix of upper and lower.

So if the foldername is “My Folder” and I run is_dir("mY FoLdEr") the result should be true.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:00:48+00:00Added an answer on May 13, 2026 at 1:00 am

    That’s not up to PHP. That’s up to operating system and filesystem that PHP is running on. Windows is case insensitive but every version of Unix/Linux is case sensitive.

    Let me put it another way: is_dir() is basically a wrapper to a system call or it will use the results of system calls on file info. Those system calls will either return something or not if, by the rules of that operating system and filesystem, a file is found with the matching name. PHP can’t change this so no you can’t just make is_dir() be case insensitive on Linux.

    The best you can do is get a list of files in the directory and loop through them to test to see if any match a case insensitive comparison to what you’re looking for.

    Note: you might get multiple hits eg “HOME” and “Home” will both match “home”. What would such a function (that you want) do in this case?

    Alternatively you can change all your filenames to lowercase and then you can use the lowercase version of your input to find the specified file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange (don't ask) need to see a few examples of a
All I need is a way to make a property of one class only
Basically what I need is an automated way to update the product version number
What we ideally need is, to know how Microsoft handles XAML generated code (Those
Basically, what I need is something like Dependecy Walker , but it should work
I have searched but apparently my google foo is weak. What I need is
Any recommended crypto libraries for Java. What I need is the ability to parse
There is need for quering NHibernate for several instances of the entity. I've tried
I have a friend who is need of a web page. He does interior
Can anyone tell me what the need/advantage is to using a web service with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.