Page 1 of 1

Wondering how the "pros" do it...

Posted: Fri Apr 11, 2003 3:10 pm
by Jim
When talking about forums such as phpBB and Invision Board, I'm wondering how they set up their administration systems.

If you go the admin system of this board, you will find a page that allows you to edit general configuration. For instance -- script paths, database information and stuff like timezone and the like.

This information is also to be found on a text file on the server where the forum is installed.

My question is: Exactly how do they edit these text files with the admin center?

I can't quite grasp how to use strpos() and the like to find text and then edit the information AFTER it. Anywhere I can get sensible help?

Thanks!

Posted: Fri Apr 11, 2003 3:26 pm
by volka
you might let the script write the complete configuration file, e.g. writing to a temp-file and then moving.

Posted: Sat Apr 12, 2003 8:12 am
by m3mn0n
It's pretty easy if you think about it.

All thoses pages with options are just mysql data that is displayed within input boxes. If you make an update, all the input boxes get sent to the database for an update.

As for anything that has to do with .txt files.

They use the file system functions, such as fopen, fclose, fwrite, and chmod, etc...

If you first look at something trying to graps in your mind how they did it is often a challenge, especialy if your new to scripting php. Don't worry, after a few, you'll get the hang of it. :wink: