I'm trying to call Prolog using a PHP script. I'm using the syntax I found here, which is:
$cmd = "nice -n15 /software/bin/pl -f /home/popx/cgi-bin/test.pl -g test,halt";
The program /bin/pl
is where I have Prolog installed, and /home/popx/cgi-bin/test.pl
is the location of the file to be consulted. After changing the paths accordingly, I get no output. Can someone help me, and give me some pointers?
I'm already conversant with the questions How to use Prolog with PHP?, and Invoking SWI-Prolog from PHP, but they do not answer my question.
You cannot retrieve the output with system()
. Use exec()
instead.
http://docs.php.net/manual/en/function.exec.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With