On Tue, 17 Oct 2000, Gilles Detillieux wrote:
> According to Nick Seacroft:
> > A search engine is installed and working. The search needs to be run
> > from php. php4 is installed and working on the server. A blank page is
> > displayed instead of search results. Below is the code in results.php. Is
> > there something missing? Do we need a $format entry? Is the exec line
> > correct?
> >
> > <?php
> > $HTSEARCH_PROG = "/home/httpd/INSuk/search/htdig.sh";
> > $words = EscapeShellCmd(UrlEncode($search));
> > $config = "insuk";
> > $query = "config=$config&format=$format&words=$words";
> > $command="$HTSEARCH_PROG \"$query\"";
> > exec($command,$result);
> > ?>
>
> I don't see any errors in the code above, but I'm no PHP expert. I do
> have to ask, though, are you sure the htdig.sh script referenced above
> does indeed call htsearch, passing it its argument as a quoted string?
> You may want to manually call this script with a query string argument
> constructed as above, to make sure it's working as it should. Also,
> if you haven't already done so, please read the "Search This" guide to
> using PHP with htsearch.
>
> See http://www.htdig.org/contrib/guides.html
>
> --
> Gilles R. Detillieux
Further to what Gilles has said: if the above is your script in total then
I would not expect it to display anything. The output from $command is
stored in the array $result; you would need to loop through the array and
display each of the elements.
Alternatively, consider using passthru which will pass back results
directly.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.
List archives: <http://www.htdig.org/mail/menu.html>
FAQ: <http://www.htdig.org/FAQ.html>