On Wed, 1 Oct 2003, Dennis Sterzenbach wrote: > Hi, > > I recognized there isn't any built-in function which > tells the disabled/enabled state of some function. > I think of something like: > > if (function_enabled("shell_exec")) { > $info = shell_exec("dig myname.com"); > } > > telling if shell_exec is disabled by php.ini setting > or not.
You can either use function_exists() to check if a function is available, or use "ini_get('disabled_functions')". Derick -- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ ------------------------------------------------------------------------- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php