Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

replaced http://it2.php.net with https://www.php.net
Source Link

If you need to execute a command from php you can do it using the native function system() or exec(). For example if you would like execute bash command uname -a, with system call:

$output = system("uname -a", $status);

second argument is optionally; if it's present, return the status of the executed command. For more details i suggest you to take a look to follow php man pages

http://it2.php.net/manual/en/function.system.php https://www.php.net/manual/en/function.system.php

http://it2.php.net/manual/en/function.exec.php https://www.php.net/manual/en/function.exec.php

If you need to execute a command from php you can do it using the native function system() or exec(). For example if you would like execute bash command uname -a, with system call:

$output = system("uname -a", $status);

second argument is optionally; if it's present, return the status of the executed command. For more details i suggest you to take a look to follow php man pages

http://it2.php.net/manual/en/function.system.php

http://it2.php.net/manual/en/function.exec.php

If you need to execute a command from php you can do it using the native function system() or exec(). For example if you would like execute bash command uname -a, with system call:

$output = system("uname -a", $status);

second argument is optionally; if it's present, return the status of the executed command. For more details i suggest you to take a look to follow php man pages

https://www.php.net/manual/en/function.system.php

https://www.php.net/manual/en/function.exec.php

Source Link
sergioska
  • 345
  • 1
  • 5
  • 18

If you need to execute a command from php you can do it using the native function system() or exec(). For example if you would like execute bash command uname -a, with system call:

$output = system("uname -a", $status);

second argument is optionally; if it's present, return the status of the executed command. For more details i suggest you to take a look to follow php man pages

http://it2.php.net/manual/en/function.system.php

http://it2.php.net/manual/en/function.exec.php

default

AltStyle によって変換されたページ (->オリジナル) /