Program execution Funkcje
PHP Manual

shell_exec

(PHP 4, PHP 5)

shell_execExecute command via shell and return the complete output as a string

Opis

string shell_exec ( string $cmd )

This function is identical to the backtick operator.

Parametry

cmd

The command that will be executed.

Zwracane wartości

The output from the executed command.

Przykłady

Example #1 A shell_exec() example

<?php
$output 
shell_exec('ls -lart');
echo 
"<pre>$output</pre>";
?>

Notatki

Informacja: Ta funkcja jest niedostępna jeśli PHP działa w trybie bezpiecznym

Patrz także


Program execution Funkcje
PHP Manual