1
Existe-t-il un moyen de rendre cette fonction de script simple?Variables dans le script shell_exec()
<?php
$hi = "echo hi";
shell_exec($hi);
echo "<pre>$output</pre>";
?>
aidez-moi s'il vous plaît?
Existe-t-il un moyen de rendre cette fonction de script simple?Variables dans le script shell_exec()
<?php
$hi = "echo hi";
shell_exec($hi);
echo "<pre>$output</pre>";
?>
aidez-moi s'il vous plaît?
Bien sûr, affectez simplement la variable.
<?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>";
ne devrait pas 'shell_exec ($ hi);' lire '$ output = shell_exec ($ hi);'? – DaveRandom
thx, je dois avoir accidentellement supprimé quelque chose, c'est ce que j'avais à l'origine –