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 exampl
You can open the file
$lines = file('myConstants.php');
Edit the content and than save it back
$myFile = 'myConstants.php' $fh = fopen($myFile, 'w') or die("can't open file"); fwrite($fh, 'DATA HERE'); fclose($fh);