linux - How to get the response status value of system command execution in PHP -


i want know response status of system command execution in php, tried below code , returns 0 value ,here code:

<?php system("ls -lrt ",$return_value); echo $return_value; ?> 

in bash,it uses 0 express ok. command 'ls -lrt' not fail, return 0. if want output, should use exec()


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -