Re: PHP documentation searchability

From: Date: Fri, 06 Sep 2002 21:24:58 +0000
Subject: Re: PHP documentation searchability
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-12309@lists.php.net to get a copy of this message
Read the mirroring docs where we explain how to set up a full php mirror. On Thu, 5 Sep 2002, Benjamin Smith wrote: > Downloaded the documentation for PHP so that I could host it here and save you the bandwidth. > However, I was surprised to find that the documentation download consists only of .html files, and > doesn't contain any search code! > > I don't quite understand your motivations for this - even a rudimentary search engine > would be very helpful and would mitigate the surely heavy load of hits you're serving. > > Here's a simple something I hacked together... renamed index.html to index.ihtml (so that > apache wouldn't pick it up) and then made this index.php: > > > <SNIP> > <? > IF ($search=trim($_REQUEST[search])) > { > if (file_exists('./function.'.$search.'.html')) > header('location: function.'.$search.'.html'); > elseif (file_exists('./functions.'.$search.'.html')) > header('location: functions.'.$search.'.html'); > else echo "<FONT COLOR=RED>No matching function(s) found</font>"; > } > ?> > <FORM METHOD=POST ACTION='index.php'> > <INPUT TYPE=TEXT NAME=search VALUE="<? > echo htmlentities($search); ?>"> > </FORM> > <? include './index.ihtml'; ?> > ?> > > </SNIP> > > -Ben > > "The best way to predict the future is to invent it" > > > >

« previous php.mirrors (#12309) next »