For required/included files in PHP, is it better to use .inc extensions vs .inc.php vs .php extensions?
For required/included files in PHP, is it better to use .inc extensions vs .inc.php
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.
Sometimes people use the
.incextension and then do some server configuration to keep.incfiles from being accessed via a web browser. This might be good, if done absolutely correctly by a knowledgeable sysadmin, but there’s a better way: Any file that’s not supposed to be accessed by web users should be kept outside your document root. Once these files are off the web, so to speak, you can use whatever extension you want..phpis definitely a sensible choice for syntax highlighting, general sanity, and so on.