Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    online search and replace editor?how

    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??
    Move on....

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    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?
    Omnis mico antequam dominus Spookster!

  • #3
    New Coder
    Join Date
    Sep 2003
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    $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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •