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

  • SEARCH
  • Home
  • 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 974165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:23:31+00:00 2026-05-16T03:23:31+00:00

(THIS IS A DUPLICATE, I FORGOT A TAG, PLEASE FORGIVE) I’m writing a small

  • 0

(THIS IS A DUPLICATE, I FORGOT A TAG, PLEASE FORGIVE)

I’m writing a small CMS for a client using my own little framework and am running into one issue (not 100% sure it’s an issue, but I’m sensing it will be).

So, for example, I have a News.php class that handles all of my Blog updates (CMS user input) and output (display of blog data on actual site). Now, because It makes me feel safer, I tuck all my classes that have to do with the CMS in a password protected “admin” folder.

The problem here arises when I need to utilize my nifty News.php class for the “View” layer of the site. I’m assuming since the class will be sitting in a password protected folder (admin/includes) anyone viewing the blog page will be prompted for the user and login for that folder in order to view the blog contents.

Is there a way of letting local files access password protected directories without being prompted for user and password info? (or does this happen?)

AND OR

Would you recommend storing my classes in a separate area of the site. I feel like the more locations I store my classes in the more complex my includes become, which can quickly turn into a nightmare. My ultimate goal would be to have ALL of my classes safely tucked away somewhere. Instead, as it is, I’ve been duplicating some classes for use outside or inside the admin directory.

Thanks in advance for the input.

  • 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-16T03:23:32+00:00Added an answer on May 16, 2026 at 3:23 am

    The php include() function should be using the local file system, and thus is not bound by apache’s .htaccess or other user access control mechanisms.

    There should only be 1 copy of your class on the entire system. If it is used by both /admin and by the user portions perhaps you should create a /common folder to house these general purpose classes/functions. If a file containing only a php class is accessed directly nothing will happen. You could add a .htaccess deny from all if you are paranoid, or if you like using the .inc file extension which will spill source code to the attacker.

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

Sidebar

Related Questions

I'm building a small CMS in PHP for a client and something I've noticed
Duplicate of this question . update - This is not an exact duplicate. See
Comment on Duplicate Reference: Why would this be marked duplicate when it was asked
Closed as exact duplicate of this question . I have an array/list of elements.
Closed as exact duplicate of this question . But reopened, as the other Singleton
This is an exact duplicate of: IE6 issues with transparent PNGs Firefox: IE 6:
Earlier this week I ask a question about filtering out duplicate values in sequence
I hope this isn't considered a duplicate since it's more pointed than similar questions
This has been an adventure. I started with the looping duplicate query located in
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be

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.