Is there any function in PHP that I can use to detect whether or not the exec
function is available?
<?php function exec_enabled() { $disabled = explode(',', ini_get('disable_functions')); return !in_array('exec', $disabled); } ?>
EDIT: Fixed the explode as per Ziagl's comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With