Inside my automation.php
controller, I have the following function:
public function deploy_test() {
echo json_encode(system("python --version"));
}
When the user wants to deploy a test, by clicking a test
button in the webpage, he would be able to accomplish such a task.
However, when I click the test
button, my output is:
""
Meanwhile, when I execute the same function with the command:
public function deploy_test() {
echo json_encode(system("ls -l"));
}
I'm getting:
total 32
drwxr-xr-x. 15 philippe philippe 4096 Mar 4 16:48 application
drwxrwxr-x. 2 philippe philippe 4096 Mar 4 17:28 css
-rw-r--r--. 1 philippe philippe 6357 Jan 30 11:53 index.php
drwxrwxr-x. 2 philippe philippe 4096 Feb 27 15:38 js
-rw-r--r--. 1 philippe philippe 2496 Jan 30 11:53 license.txt
drwxr-xr-x. 8 philippe philippe 4096 Jan 30 11:53 system
drwxr-xr-x. 12 philippe philippe 4096 Jan 30 11:53 user_guide
Could someone please help me to get that straighten out?