Need some help

I write a website with php and javascript.
I need a way for my website to take a settings information from a single file located on the server and no in the database.

I mean for example: “setting.php”. That include all the settings of the web.
The question is:

  1. How to require the website use only the settings in the “settings.php” file?
  2. how to make this file possible to be edited from admin console securly?
    You can just give me the idea behind that.

Thanks a lot!

It really depends on how you are coding the settings in the settings.php

If your file contains

[php]<?php
$setting1 = ‘Hi’;
$setting2 = ‘bye’’;
?>
[/php]

Then you will used an include statement

http://php.net/manual/en/function.include.php

if you want to edit the file via an admin console, you can load up the contents of the file in a textarea make changes to it and then save it back using

You can do something similar to what the guy did here…

Amazing!
Why i don’t think about this before.

Thank you so much!

Sponsor our Newsletter | Privacy Policy | Terms of Service