- #1
C
Cledith
Bekanntes Mitglied
Themenersteller
- Dabei seit
- 04.11.2001
- Beiträge
- 1.210
- Reaktionspunkte
- 0
Hi,
ich habe mal eine Frage. Ich möchte eine Suche auf einer website einbauen. Doch noch liegt die site ausschließlich bei mir auf'm Rechner. Ich habe einen Apache laufen, auf dem ich alles ausprobiere. Jetzt weiß ich jedoch nicht, wie ich die Suche zum Laufen bekomme. Die Suche ist in Perl geschrieben.
Zunächst: Wo muss ich die Dateien hinkopieren?
Dann muss ich dem Script ja noch diverse Sachen mitteilen.
Um es etwas einfacherer zu gestalten und da ich im Moment faul bin (;D) poste ich das hier einfach:
Danke euch!
Mfg,
Cledith
ich habe mal eine Frage. Ich möchte eine Suche auf einer website einbauen. Doch noch liegt die site ausschließlich bei mir auf'm Rechner. Ich habe einen Apache laufen, auf dem ich alles ausprobiere. Jetzt weiß ich jedoch nicht, wie ich die Suche zum Laufen bekomme. Die Suche ist in Perl geschrieben.
Zunächst: Wo muss ich die Dateien hinkopieren?
Dann muss ich dem Script ja noch diverse Sachen mitteilen.
Um es etwas einfacherer zu gestalten und da ich im Moment faul bin (;D) poste ich das hier einfach:
Kann mir jemand sagen was ich wo eintragen muss oder mir eine Adresse sagen, wo ich nachlesen kann, was basdir und basurl dann sein würden?$basedir =->';
This is the base directory to the files you will want to
search. If you have all of your files in /home/joe/public_html
and you want to search files that are in
/home/joe/public_html/work and /home/joe/public_html/fun, then
you would set your base directory at /home/joe/public_html/ and
then put subdirectories into the @files array, since they will be
put together at run time. The $basedir variable just saves you the
time of having to type out the basedir over and over again for
every file you want to include.
$baseurl =->';
This is very similar to the basedir variable except that
it will be used as a base reference to the files you want to search
in terms of the web. For the example above with user joe, his
baseurl would probably be something like: http://joe.host.com/~joe/
so that when the searched files are appended to this baseurl, they
form a complete url to his files to place in the results.
@files = ();
This is an array that includes all of the files you want
to search. The directory paths and filenames should be in
reference to $basedir. Wild cards are allowed in this array, so if
joe wanted to search all html files in fun/ and work/, he would set
his @files array up as: @files = ('fun/*.html','work/*.html'); You
can also search whole directories at one time, like: @files =
('fun/','work/'); This would search all text files located in these
directories. Putting exact filenames will search only that filename.
$title = ;
This variable is used to display the title of your page
in the search results and used to link back to your main page.
$title_url =->';
This is the url that would link to the page $title.
$search_url =->';
This is the url to the search.html page you set up, so
that it can be referenced from in the results page if users want
to make another search.
Danke euch!
Mfg,
Cledith