Run Shell Script From Php File

[Solved] Run Shell Script From Php File | Shell - Code Explorer | yomemimo.com
Question : run shell script from php file

Answered by : lebohang-mokoena

echo shell_exec('sh /home/scripts/fix-perm.sh');

Source : https://stackoverflow.com/questions/7397672/how-to-run-a-sh-file-from-php | Last Update : Mon, 14 Dec 20

Question : execute script php command line

Answered by : erwan-hoeltzener

php php_file.php
// or
php php_file.php > result_file.txt // to display the result of echoes or dumps

Source : | Last Update : Mon, 01 Feb 21

Question : how to execute a php script from the command line?

Answered by : nitesh-jangid

To execute a php script, use the PHP Command Line interface(CLI) and specify the file name of the script in the following way:
php script.php

Source : | Last Update : Tue, 29 Dec 20

Answers related to run shell script from php file

Code Explorer Popular Question For Shell