nicob Posted November 17, 2008 Share Posted November 17, 2008 For the webmasters working with this script...Do you know a solution for next "problem"? My text file contains something like this (example is just a copy from Wikipedia): Line (geometry), an infinitely-extending one-dimensional figure that has no curvature a length of rope, cable or chain when put to use (such as a clothesline, anchor line) a line or queue of people waiting in a queue area a line of text in writing When I search for 'figure', I get 'Line (geometry), an infinitely-extending one-dimensional figure that has no curvature' (cool!) When I search for 'that has no curvature', I get 'Line (geometry), an infinitely-extending one-dimensional figure that has no curvature' (cool!) BUT when I search for 'figure curvature', I get NOTHING. So this script is search for the exact match. Is there a way to tell this script to show the lines with 'figure' and 'curvature' in the same line? Quote Link to comment https://forums.phpfreaks.com/topic/95042-txt-file-search-program-needed/page/2/#findComment-691815 Share on other sites More sharing options...
wildteen88 Posted November 17, 2008 Share Posted November 17, 2008 If you're using this version here Then enter each word to search for on a separate line. Quote Link to comment https://forums.phpfreaks.com/topic/95042-txt-file-search-program-needed/page/2/#findComment-692160 Share on other sites More sharing options...
nicob Posted November 17, 2008 Share Posted November 17, 2008 If you're using this version here Then enter each word to search for on a separate line. Yes, I'm using that version. But now I understand why I didn't understand that part of search: - When you have let's say 10 lines with 'figure' and 'curvature' not all words get a red or blue color (when on the same line, in some cases only one word gets a color). - Because I'm using GET (and not POST) I see an url like .../search.php?keyword=figure%0D%0Acurvature&submit=Search. I expected '+'. I have tested out alot of search-in-files-script, but this is the best: simple to use, great options, and no database required Some technical questions for coders: 1. How do you convert '%0D%0A' to '+' in the url? 2. I'm trying to include the result in a page in a local format <?php include "/home/account/domains/domain.com/public_html/search.php?keyword=garden&submit=Search"; ?> but this is not working, so now I'm using fopen to reach the same result. But I have to use 'http'. Is there a solution for this? 3. is it possible to remove '&submit=Search' from the output url? Quote Link to comment https://forums.phpfreaks.com/topic/95042-txt-file-search-program-needed/page/2/#findComment-692204 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.