The main script contains "module" which adds functionality to it. Each module is set to:
& lt ;? Php // data storage accessories // (...) Approximately 80 lines of code // and data collection $ var1 = 'some data'; $ Var2 = 'more data'; $ Var3 = 'other data'; ? & Gt; Each module has the same exact variable, just the data collection is different.
I was wondering if this is a fair idea such as storing module data in MySQL like this:
[database] | _modules | _name | _function (raw PHP data from above). _description | _author | _update-url | _version | _enabled ... and then include PHP-data from the database and execute it? The tab-navigation system at the top of the page for each module name, is something like that, then by parsing the database-stored code of the content module of the page in each tab, by parsing it to function ; Section To save the purpose code space (lower lines), allow easy updates, and include / exclude modules based on the enabled option. It is that many other web-apps work, some of my own work also, but I have never thought so deeply about this, have there any drawbacks or security risks on this?
For example, this approach uses PHP "snippets" and the module is stored in the database is. Most of those PHP snippets just set some configuration values and later include the main module code from the files on the server.
The main advantage is flexibility in editing module configuration, because all modules can be edited in the backend, on the other hand of CMS, allows to edit plug-in-php code from within the backend. , But stores everything in the form of files on the server without having to store php in the database.
OK, really no answer, but I think it's a matter of taste.
Comments
Post a Comment