PHP cli getting input from user and then dumping into variable possible? -


is possible input user using php cli , dump input variable , script goes ahead.

just c++ cin function ?

is possible if yes how ? maybe not php maybe linux commands ?

thanks

have @ php manual page http://php.net/manual/en/features.commandline.php

in particular

<?php echo "are sure want this?  type 'yes' continue: "; $handle = fopen ("php://stdin","r"); $line = fgets($handle); if(trim($line) != 'yes'){     echo "aborting!\n";     exit; } echo "\n"; echo "thank you, continuing...\n"; ?> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -