Re: [htdig] Problem with integrating php and htdig


Subject: Re: [htdig] Problem with integrating php and htdig
From: Marcel Hicking (hicking@du.gtn.com)
Date: Tue Oct 17 2000 - 02:18:17 PDT


Nick Seacroft <nick.seacroft@articon-integralis.com> 16 Oct
2000, at 15:00:

>[...] 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);
> ?>
Have you tried:
passthru($command,$resultcode);
This will pass all output from $command right
to the webbrowser (actually, standard out ;-)

The errorlevel $command terminated with will be found in
$resultcode.

exec() does not output anything, it just returns the
*last* line of $command's output. If this happens to be a
newline...

Regards, Marcel

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-unsubscribe@htdig.org
You will receive a message to confirm this.
List archives: <http://www.htdig.org/mail/menu.html>
FAQ: <http://www.htdig.org/FAQ.html>



This archive was generated by hypermail 2b28 : Tue Oct 17 2000 - 02:27:01 PDT