Can one .PHP file edit another?

Posted by Ole Jak on Stack Overflow See other posts from Stack Overflow or by Ole Jak
Published on 2010-04-05T14:33:47Z Indexed on 2010/04/05 14:43 UTC
Read the original article Hit count: 402

Filed under:
|
|

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 )

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?

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

© Stack Overflow or respective owner

Related posts about php

Related posts about file