note 94924 added to features.commandline

From: Date: Thu, 03 Dec 2009 01:34:48 +0000
Subject: note 94924 added to features.commandline
Groups: php.notes 
Request: Send a blank email to php-notes+get-163513@lists.php.net to get a copy of this message
If you want to be interactive with the user and accept user input, all you need to do is read from stdin. <?php echo "Are you sure you want to do this? Type 'yes' to continue: "; $handle = fopen ("php://stdin","r"); $line = fgets($handle); if(trim($line) != 'yes'){ echo "ABORTING!\n"; exit; } echo "\n"; echo "Thank you, continuing...\n"; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 67.207.96.194 ---- Manual Page -- http://www.php.net/manual/en/features.commandline.php Edit -- https://master.php.net/note/edit/94924 Del: integrated -- https://master.php.net/note/delete/94924/integrated Del: useless -- https://master.php.net/note/delete/94924/useless Del: bad code -- https://master.php.net/note/delete/94924/bad+code Del: spam -- https://master.php.net/note/delete/94924/spam Del: non-english -- https://master.php.net/note/delete/94924/non-english Del: in docs -- https://master.php.net/note/delete/94924/in+docs Del: other reasons-- https://master.php.net/note/delete/94924 Reject -- https://master.php.net/note/reject/94924 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163513) next »