View Single Post
Old 02-11-2004, 08:08 AM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
>> Now I wonder why anyone would want to set it on.

Hi. Only the first words from an indexed page are in the database table.

>> Isn't using the DB *always* better than using a directory?

http://discuss.fogcreek.com/joelonso...w&ixPost=99830
http://www.faqts.com/knowledge_base/...phtml?id=11839
http://lists.evolt.org/archive/Week-...08/109650.html

>> The backslash hasn't gone away... Shouldn't it have by now?

With unmodified version 1.8.0, when you index word1\word2 only word1 word2 are in the keywords table, no backslash. The backslashes in the PhpDig code are there for escaping purposes.

The following code will remove the backslashes from your example:

<?php
$query_to_parse = addslashes('w5+6w*56[_ww5]:ww6°!w55(w66)w5w5\w6w6');
$query_to_parse = str_replace('_','\_',$query_to_parse);
$query_to_parse = str_replace('%','\%',$query_to_parse);
$query_to_parse = str_replace('\"',' ',$query_to_parse);
$query_to_parse = strtolower($query_to_parse);
$text = ereg_replace('[^w56 \\'._~@#$:&%/;,=-]+',' ',$query_to_parse);
$query_to_parse = trim(ereg_replace(" +"," ",$text));
echo htmlspecialchars($query_to_parse);
?>
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote