note 124165 added to function.passthru
| From: | tox at novasonica dot com | Date: | Tue, 03 Sep 2019 10:57:09 +0000 |
| Subject: | note 124165 added to function.passthru | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-212092@lists.php.net to get a copy of this message | ||
I was trying to implement a system that allows running arbitrary CLI commands with parameters, but I
kept running into the issues with user prompts from the command as they would let execution hang.
The solution is simple: just use passthru() as it outputs everything and correctly handles user
prompts out of the box.
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.195 (proxied: 128.199.45.90)
----
Manual Page -- http://php.net/manual/en/function.passthru.php
Edit -- https://master.php.net/note/edit/124165
Del: integrated -- https://master.php.net/note/delete/124165/integrated
Del: useless -- https://master.php.net/note/delete/124165/useless
Del: bad code -- https://master.php.net/note/delete/124165/bad+code
Del: spam -- https://master.php.net/note/delete/124165/spam
Del: non-english -- https://master.php.net/note/delete/124165/non-english
Del: in docs -- https://master.php.net/note/delete/124165/in+docs
Del: other reasons-- https://master.php.net/note/delete/124165
Reject -- https://master.php.net/note/reject/124165
Search -- https://master.php.net/manage/user-notes.php