I have problem with following script:
$ exec('mode con /status', $tmp); print_r($tmp);
It runs the command and gives me result, but also I get every time error message too:
The system cannot find the path specified.
I just want get 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 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans
C:\@home\Devel>C:\php\php.exe -r "exec('mode con /status', $tmp); print_r($tmp);"
The system cannot find the path specified.
Array
(
[0] =>
[1] => Status for device CON:
[2] => ----------------------
[3] => Lines: 1200
[4] => Columns: 160
[5] => Keyboard rate: 31
[6] => Keyboard delay: 0
[7] => Code page: 775
[8] =>
)
How can I get rid of this error message!?!
Thanks.