Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
tty を必要とする PHP で shell_exec を実行することは可能ですか?
<?php $output = shell_exec("read foo; echo $foo"); ?>
そうでない場合、代替手段は何ですか?
どうですか:
<?php echo shell_exec('read foo; export foo; echo $foo');
注: スクリプトの終了後、var foo はシェルで使用できなくなります。