如何使shell_exec返回.exe的时间和内存使用情况

I need to make an shell_exec in a php script in order to start a .exe program and when the program completes to return the execution time and the memory usage...also if the program execution time is more than 10 seconds it will be automatically stopped...how can I do this ?

There is no 'nice' way of doing such thing in php. You can maybe hack it all up(mess with perl -e "alarm 10; exec @ARGV" "somecommand" and etc) but there is an easy solution to this. You should look into making a 'wrapper' for your executable, (like a shell script, or a program that will execute your program but will monitor its progress and kill it for you if it runs too long).

php doesn't have this capability (as far as i'm aware of)...

other ways may be: