[ Jocelyn Ireson-Paine's Home Page | How to Call SWI-Prolog from PHP ]

Calling SWI-Prolog from PHP

  system( $cmd );
Prolog 
was called 
from PHP 
successfully. 
  $output = exec( $cmd );
  echo $output;
successfully. 
  exec( $cmd, $output );
  print_r( $output );
Array
(
    [0] => Prolog
    [1] => was called
    [2] => from PHP
    [3] => successfully.
)
 
  $output = shell_exec( $cmd );
  echo $output;
Prolog 
was called 
from PHP 
successfully.