I am trying to write a file using this:
<?php
$filename ="fileA.php";
$file = fopen( $filename, "w+");
$string = "TEXT";
fwrite($file, $string );
fclose($file );
?>
which will write something along the lines of this to a file:
<?php
$dbuser = 'username';
$dbpass = 'passwd';
$dbserver = 'localhost';
$dbname = 'name';
?>
How do I use the top script to print out the variable name including the $ sign.
I hope I have explained it well...so if i have $myvariable=0; I want my file to give me BOTH "0" and "$myvariable"
I will use include to retrieve the information for my other scrips, so how do i do that or is there a better way 😕
thanks