...

View Full Version : online search and replace editor?how



kab_184
10-26-2003, 06:55 AM
hi

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??

Mhtml
10-26-2003, 01: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?

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

then

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum