Running Shell Commands


I am new to the Yii2 framework and has browse through the documentation but have not come across any example of calling shell commands (Linux batch file/executable) from within yii2. The is example on console but that is more of a running yii from command prompt.

I have a compiled program that outputs standard IO and would like to process the output within yii. Any help would be appreciated. Thank you.


It’s no different from running shell commands from plain PHP.

I’m using Symfony Process Component in my project.

Dear all,

Thanks for the reply and suggestions.