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,我必须不小心删除了一些东西,那就是我原来的东西 –