Search and replace info on a file?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
danf_1979
Forum Commoner
Posts: 72
Joined: Sun Feb 20, 2005 9:46 pm

Search and replace info on a file?

Post by danf_1979 »

Hi,
I need to change some config in a file. The file gots the following:

Code: Select all

$dbuname = "root";

$dbpass = "";

$dbname = "nuke";
I need to replace the info for the dbuname, dbpass and dbname. How is this topic called? I dont want to write the complete archive to change only those 3 parameters. I want to search for them and change (write) them. Any links you can recommend? Or a good tip?
:)
Post Reply