michaelsanford
Translator, Web Developer
I've got a nice little one-liner that I use to copy all .php files in the cwd to .phps files so my co-workers can see them.
Despite the fact that I have the folder password protected, I'd really like to be able to strip the passwords from the .phps files automatically. It also makes it easier to print the code (coloured from a web browser) without having to manually obliterate them with a pen... Passwords appear in things like mysql_connect() calls.
The password is a unique string that does not occur anywhere else in the script (that is, it's not a common word I need to be worried about removing only certain instances of).
So essentially I just need to search the contents of a plain-text file word by word, and if it finds this password string, replace it.
Any ideas? I don't know any PERL
Thanks!
Despite the fact that I have the folder password protected, I'd really like to be able to strip the passwords from the .phps files automatically. It also makes it easier to print the code (coloured from a web browser) without having to manually obliterate them with a pen... Passwords appear in things like mysql_connect() calls.
The password is a unique string that does not occur anywhere else in the script (that is, it's not a common word I need to be worried about removing only certain instances of).
So essentially I just need to search the contents of a plain-text file word by word, and if it finds this password string, replace it.
Any ideas? I don't know any PERL
Thanks!