Hi, I want to write function which change variable in ie. config.php file ... Here is code:
<? include "config.php"; $file = fopen("config.php", "w+"); $content = fread($file, filesize("config.php")); $content = str_replace("\$option['test'] = \"" . $option['test'] . "\";", "\$option['test'] = \"po tescie\";", $content); fwrite($file, $content); ?> and config.php: <? $option['test'] = "test"; ?> and it's doesn't work :( ... when I run script, it clear config.php and nothing else ... where is my fault? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php