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.