Page 1 of 1

Run a Ms-dos program and catch the output

Posted: Wed Oct 13, 2010 8:06 am
by mariolopes
Hi
I need to run a ms-dos program (made in vc++, vs 2008, console mode) and catch the output. For instance if my program returns the 2 times a number i want my php page runs the program, send one value and verifies if the output is correct. I heard about procopen() function but I don't know much about it.
Any help?
Thank you

Re: Run a Ms-dos program and catch the output

Posted: Wed Oct 13, 2010 9:15 am
by Weirdan
Use execution operator: http://us2.php.net/manual/en/language.o ... cution.php

btw, console applications != dos applications.

Re: Run a Ms-dos program and catch the output

Posted: Wed Oct 13, 2010 1:10 pm
by mariolopes
Thank you weirdam
I'll try it, but I think I need procopen because I want to use cin to read values into my program
I'm right?