How to determine if a file is marked as hidden using only PHP functions? This applies especially on Windows and Linux.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
In a UNIX system, a file is hidden if its name starts with a dot (
.).In Windows, a file is hidden if it has the hidden attribute.
You can create a function which checks the attributes under windows and checks the file name under a POSIX compliant system as such: