View Full Version : online search and replace editor?how

10-26-2003, 07:55 AM

i ma having around 200 plus pages..in my site
now the problem is that to change one line i have to either edit the original or upload it or i have to do online editin by opening the files one by one

is ther any way i can just put some php script on my root public_html and when i run this script it opens and find s the line and then replace it the one i want to..

so i can avoid NEW uploading or opening n editing of each file manually..

i saw a search engine it searches the file LIVE...which mean it opens the file and searches the specific word and tehn returns the address/URl of the file if the words is found
so if it can opend and search then it can search n replace the file as well...???automatic editor...?

does any 1 knows a way to do this??

10-26-2003, 02:30 PM
Sure, very easy.

But it depends on the specific search string, so what is it exactly you want to replace?

Or is it on the same line on every page?

10-26-2003, 03:29 PM
$doalooptomakethisvar = file_get_contents("doalooptogetthisfile");


preg_match_all for the string, OR preg_replace the string, then make a function to write the data or write it out.