php - Finding Win CMD columns (gives result+error) -
i have problem following script:
$ exec('mode con /status', $tmp); print_r($tmp);
it runs command , gives me result, every time error message too:
the system cannot find path specified.
i want terminal window size $cols
x $rows
used system: php 5.4 + win7
test results here: c:\@home\devel>c:\php\php.exe -v php 5.4.13 (cli) (built: mar 15 2013 02:05:59) copyright (c) 1997-2013 php group zend engine v2.4.0, copyright (c) 1998-2013 zend technologies xdebug v2.2.2, copyright (c) 2002-2013, derick rethans
c:\@home\devel>c:\php\php.exe -r "exec('mode con /status', $tmp); print_r($tmp);" the system cannot find path specified. array ( [0] => [1] => status device con: [2] => ---------------------- [3] => lines: 1200 [4] => columns: 160 [5] => keyboard rate: 31 [6] => keyboard delay: 0 [7] => code page: 775 [8] => )
how can rid of error message!?!
thanks.
Comments
Post a Comment