Good day comrades! In my free time I continue to write my CMS system, there were many versions of the system (about 12) and with each new version, the functionality was added and the speed increased, however, this is the problem:

The system needs to store the settings, read and use them in the main file, and read and modify them in the admin panel.

I tried to store the settings in the XML files, everything is fine, but the performance dropped noticeably.

What are the ways to store and write "settings" without using the database?

    1 answer 1

    1. The classic version of storing "settings" is ini-files.
    2. Serialization of a certain array of settings and writing to a file.
    3. And in the file you can write the actual php-code itself with an array of settings.
    4. PEAR :: Config - but this is XML, you can cross out.

    In general, the whole task is to write something into a file, to read something from it. If XML is long for you, then you are either an optimization guru and fight for every kilobyte of memory (which is commendable), or you are overloading the XML parser with regular curves.

    Try ini - quite convenient.

    http://ru.wikipedia.org/wiki/.ini

    http://php.net/manual/ru/function.parse-ini-file.php

    • I considered such an option and stopped there, but are there any standard tools in PHP for writing (changing) values? - Andrei Arshinov
    • I do not quite understand the phrase "standard tools" in the context of the question. Do you want an analogue of the MS Windows registry? There is no such. But there are a lot of ready-made libraries for working with configs, and most of them work with XML. - Indifferent
    • Clearly, thank you!) - Andrei Arshinov