Replace a line of code in a php file using php

By | February 19, 2015

Replace a line of code in a php file using php

To replace the below line of code in the testreplace.php

define(‘PATH_CURRENT_SITE’, ‘/mydoubts/’);

this should be changing to

define(‘PATH_CURRENT_SITE’, ‘/vasanthan/’);

For this please execute the stringreplace.php… changes will reflect in the testreplace.php

#File-stringreplace.php

2.#File-testreplace.php