grazie mille funziona, posto il codice (cosi' chi come me ha bisogno, trova una possibile soluzione):


if(@$fh = fopen("user/index.php", 'r')){
@$str = fread ($fh, filesize("user/index.php"));
$str = str_replace('$username="";', '$username="user";', $str);
@fclose($fh);

@$fh = fopen("user/index.php", 'w');
@fwrite($fh, $str);
@fclose($fh);

Grazie ancora