So, I have a file for constants. I want the user to define them and then edit my .php filr with these global constants (and not xml - the real PHP file).
With such code, for example
<?php
// Database Constants
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "000000");
define("DB_NAME", "cms");
?>
How to edit this .php file from another PHP file? Is it possible?
In the future, I want to implement not only constant overrides, but also some intelligent code that can modify itself.
If someone can, please show me the function to change the word "localhost" in my file ...
Rella source
share