exec コマンドを使用するための非常に単純な PHP スクリプトがあります。コードは
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo("test<br>");
echo exec('whoami');
echo("test");
?>
ただし、ページにアクセスすると、次のように出力されます。
test
test
コマンドラインから実行すると表示される「whoami」コマンドからの出力は出力されません。
me
ここで何が問題なのですか?私はそれを解決することはできません。
どうもありがとう!