1
有沒有任何可能的方法來使這個簡單的腳本功能正常?shell_exec()腳本中的變量
<?php
$hi = "echo hi";
shell_exec($hi);
echo "<pre>$output</pre>";
?>
請幫我一下嗎?
有沒有任何可能的方法來使這個簡單的腳本功能正常?shell_exec()腳本中的變量
<?php
$hi = "echo hi";
shell_exec($hi);
echo "<pre>$output</pre>";
?>
請幫我一下嗎?
當然,只是分配變量。
<?php
$hi = "echo hi";
$output = shell_exec($hi);
echo "<pre>$output</pre>";
?>
$hi = "echo hi";
# the result needs to be assigned to $output before using it
$output = shell_exec($hi);
echo "<pre>$output</pre>";
不應該'shell_exec($ hi);'read'$ output = shell_exec($ hi);'? – DaveRandom
thx,我必須不小心刪除了一些東西,那就是我原來的東西 –