<?php
function exec_enabled() {
$disabled = explode(',', ini_get('disable_functions'));
return !in_array('exec', $disabled);
}
?>
EDIT: Fixed the explode as per Ziagl’s comment.
More Related Contents:
- PHP exec() vs system() vs passthru()
- php exec command (or similar) to not wait for result
- PHP shell_exec() vs exec()
- Running a Python script from PHP
- How do you run a .bat file from PHP?
- PHP StdErr after Exec()
- Run Bash Command from PHP
- Running command-line application from PHP as specific user
- PHP exec() as Background Process (Windows Wampserver Environment)
- Checking if process still running?
- PHP exec – check if enabled or disabled
- Run a ffmpeg process in the background
- PHP exec() will not execute shell command when executed via browser
- PHP exec $PATH variable missing elements
- Running python script in Laravel
- Windows CMD.exe “The system cannot find the path specified.”
- Can’t execute PHP script using PHP exec
- exec() with timeout
- PHP exec() not returning error message in output
- What’s the difference between escapeshellarg and escapeshellcmd?
- PHP: Why isn’t exec() returning output?
- php in background exec() function
- PHP PDO prepared statements
- Finding the subsets of an array in PHP
- Execute root commands via PHP
- mysql_real_escape_string VS addslashes
- How to tell if a session is active? [duplicate]
- Find Number of Open Sessions
- PHP regex delimiter, what’s the point?
- How can I view/open a word document in my browser using with PHP or HTML