Forum und email

shell_exec

(PHP 4, PHP 5)

shell_exec — Execute command via shell and return the complete output as a string

설명

string shell_exec ( string $cmd )

This function is identical to the backtick operator.

매개변수

cmd

The command that will be executed.

반환값

The output from the executed command.

예제

Example#1 A shell_exec() example

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

주의

Note: 이 함수는 안전 모드에서 사용할 수 없습니다.


ttp://www.google-analytics.com/urchin.js" type="text/javascript">