now my website is being attacked by virus, they appended some code into database.php,config.php ,so i want to change database.php,config.php in system/application/config to dt.php,cf.php
I'm afraid this is like having someone break into your house, so you paint your house a different color. It isn't really a very good method of going about solving burglary.
If someone, or some program, is gaining unauthorized access to your files and is able to read and write directly to PHP scripts, your problem is not what you name files - it's that someone can do that at all. Either there is something wrong with your server, in which case if it is a shared host you should get them to fix it or get another host, or something is wrong on your computer so people are gaining access to your login credentials, in which case you need to address that.
Renaming core files is not a trivial task given that they are dynamically accessed, and it is unlikely to defend you for any significant period of time.