Executing python commands from php script -
I have installed SymPi in the server and from the command line, I was able to execute it I have the following. (This will open a console where I can type mathematical expressions (will give 3 as output) My purpose is to do php using Help in understanding Why is it not working? Please note that the following script works fine which executes only a python script and retrieves the output. My guess is that Your work example specifies a hard path that will work from anywhere. Whereas your non-working example specifies a relative path ( Disk to give full path to change your call to (If this does not resolve it, then say more than "Not working." What happens? An error? What is the full text of the error?)
dragon ./sympy-0.7.5/bin/isympy
1 + 2
shell_exec . I have written one of the following PHP files, but it is not working.
$ command = escapeshellcmd ('Python ./sympy-0.7.5/bin/isympy'); shell_exec ($ command); $ output = shell_xac ('1 + 2');
shell_exec is different from that person when you manually Do the execution.
./ cwd).
isympy . Or understand how to set cwd for
shell_exec .
Comments
Post a Comment