Can one .PHP file edit another?
<p>So I have a file for constants. I want to let user define them and then edit my .php filr with that global constants (not xml - real PHP file )</p>

<p>With such code for example </p>

<pre><code>&lt;?php
// Database Constants
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "000000");
define("DB_NAME", "cms");
?&gt;
</code></pre>

<p>How to edit this .php file from another PHP file? Is it possible?</p>

<p>Btw in future I want to implement not only constants redefining but some smart code that will be able to modify itself.</p>

<p>If someone can, please show me a function to change word "localhost" in my file...</p>
