leela Posted June 16, 2011 Share Posted June 16, 2011 hello, my problem is : i am able to set and get the properties using files , but i want to create from command line.. here is my code switch($argv[1]) { case 4: while (list($key, $value) = each($php_arr)) { if(array_key_exists($argv[2],$php_arr)!='') { echo $php_arr[$argv[2]]; $php_arr[$argv[2]]=ini_set($argv[2],$argv[3]); } else {echo "keyword not found";} } print_r($php_arr); break; default: print_r($php_arr); } the above code works if i give values root@ubuntu:/var/www/assign2/sel# php -q test.php 4 max_execution_time 30 BUt i want to ask for value to enter , suppose it is case 1 , then after entering 1 ..then it shud again ask for values ... can anyone give idea.. Thanks, leela Quote Link to comment https://forums.phpfreaks.com/topic/239514-command-line-arguments/ Share on other sites More sharing options...
trq Posted June 16, 2011 Share Posted June 16, 2011 PHP's probably not the ideal solution for this type of thing but you'll want to take a look at readline. Quote Link to comment https://forums.phpfreaks.com/topic/239514-command-line-arguments/#findComment-1230378 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.