執行運算子()

PHP 執行運算子由反引號(``)組成,用於執行 shell 命令。將返回命令的輸出,因此可以將其儲存在變數中。

// List files
$output = `ls`;
echo "<pre>$output</pre>";

請注意,execute 運算子和 shell_exec() 將給出相同的結果。