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 8526259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:13:18+00:00 2026-06-11T08:13:18+00:00

Current structure: htdocs mums demo.php login.php mums classes mums.class.php includes global.inc.php config.inc.php I want

  • 0

Current structure:

htdocs
  mums
    demo.php
    login.php
    mums
      classes
        mums.class.php
      includes
        global.inc.php
        config.inc.php

I want to keep mysql database info and the location of the folder containing the mums folder (the internal one) in config.inc.php. Example:

// CONFIG
$mumsConfig['dbName'] = 'mums';
$mumsConfig['dbUser'] = 'root';
$mumsConfig['dbPass'] = 'pass';
$mumsConfig['dbHost'] = 'localhost';
$mumsConfig['folder'] = 'mums';
// END CONFIG

I’d like to include the config file in any class.php file that needs it and also in the global.inc.php file for every page that needs it. The problem is I’m storing the location of the library ($mumsConfig[‘folder’]) in the config file, so I can’t include the config.inc.php file until I know that, which is in the file itself…..

I’m really at a loss on how to set up a very simple config file. FYI this is all staying on LAN so no need to worry about security.

  • 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-06-11T08:13:19+00:00Added an answer on June 11, 2026 at 8:13 am

    Since both include files are in the same directory i.e under includes. You can just do require('config.inc.php') in global.inc.php

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

Sidebar

Related Questions

The current structure of my classes goes a little bit like this: PC.Processor.Architecture[0] =
OK, i'm creating a small PHP application. The current structure is something like this:
My current directory structure is as follows: C:\xampp\htdocs\PHP_Upload_Image_MKDIR In other words, the following directories
Here is my current structure plugins/ |---init.php |---/plugin1/lib/ |---/plugin2/lib/ |---/Symfony/ I have my code
I have an NSMutableArray of NSArray's inside it. This is my current structure: Paused
My Current Database Structure: `images` `tags` `images_tags` ________________ ______________ ________________________ | id | title
My current table structure is 12 column, each representing month. I need to dynamically
The task is to make changes to current tables structure without recreating these tables.
What is the current method of implementing the joined-subclass structure with FluentNHibernate? By current,
How do I locate the current file in the project structure? (Similar to Visual

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.