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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:59:48+00:00 2026-06-03T17:59:48+00:00

Quick question – I’m trying to decide the best way to store some site

  • 0

Quick question – I’m trying to decide the best way to store some site variables. I would like build a “control panel” type feature into my site where I can chose settings and they will be reflected throughout my site.

For example – I have one item I’m selling and it has a price (and a picture to display the price). I would like to be able to set this global variable from a custom backend page instead of having to go and change the img src etc..

What is the best way to go about doing this? At first I thought a DB table but then surely it would be a slow(ish) way of accessing only a handful of site variables? I also thought about a file, but was wondering how I would go about overwriting the correct bit when values change etc.

Using your expertise, please could you recommend an avenue to go down (if there is a favourable method), many thanks! (I’m using the Yii framework if anyone else uses it too).

  • 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-03T17:59:52+00:00Added an answer on June 3, 2026 at 5:59 pm

    You may want to look into using a properties (.ini) file.

    The function parse_ini_file(string $filename) returns an array of the properties stored by an .ini file.

    However, php doesn’t have a function to write ini files included, so you will need a custom one. Here is one, write_ini_file(array $assoc_arr, string $path) which adds an arrays keys and values to the ini file at the given path, replacing old key values with new ones if necessary.

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

Sidebar

Related Questions

Quick question. For some reason links referencing the home page contain an extra /web/guest/home
Quick question! Does putting a clear element INSIDE a floated div do anything? Like:
Quick question... I have a query that checks for duplicates that looks like this:
Quick question, I'm trying to pass a value to a variable and then run
Quick question: I'm using jquery ajax to call a page that returns some json
quick question. I am trying to get C++ nailed down, and today I spent
Quick question here about short-circuiting statements in C#. With an if statement like this:
Quick question - i'm going to add a sitemap to a site I've designed
quick question. Is there any way to make this possible? int array [] =
Quick question about data joining. Say I have some elements that each contain a

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.