if(!$fp = fopen("$path/config.php",'w')) { print 'Unable to create file!'; exit; }
..... ..... .....
fwrite($fp, ...,'')); fclose($fp);
if(!$fp = fopen("$path/config.php",'w')) { print 'Unable to create file!'; exit; }
..... ..... .....
fwrite($fp, ...,'')); fclose($fp);