Thank you for your tips, Waitman.
2>&1 actually works. I was wrong on my test. Exec function successfully catches the output.
The error message was:
"command" is not recognized as an internal or external command, operable program or batch file
or
file name, directory name or volume label syntax is incorrect
The message was Japanese in reality, but a short Google search shows the message was as the above in English.
What I have found out in the further tests, the problem lies in space characters in the parameter.
I had added " (double quote) in the beginning of the parameter and in its end. But this does not work well.
When I do not add "(double quote), as a matter of course, if the parameter includes space character, this does not work.
I thought the application (abc.exe) has a bug in dealing with a double quote within the parameter, but the same program works in Windows local server (Xampp).
On PHPexe, however, the same program does not work. So I wonder why.
Thank you in advance.
Ryotaro Shimazu
2018年1月14日日曜日 1時45分33秒 UTC+9 Waitman Gobble: