I wanted to know the way to disable a function from usage in PHP.
Thanks
NoEval extension disables window. eval() function on all webpages. It also disables similar approached to eval() when the input argument's type is String: 1. eval('sample code') 2.
The disable_function allows the server to disable certain functions to upscale the security of the server. PHP has a lot of functions which can be used to crack an application's server if they are not used properly.
Return Value: This method returns a boolean value TRUE on success and FALSE on the failure of the expression. Example 1: In this example, we have created a constant namely GREETINGS and its value is Hello GFG and the name of the constant is case-insensitive by using define() function.
INI settings Disable exec, shell_exec, system, popen and Other Functions To Improve Security.
In the php.ini
configuration file, you can use the disable_functions
parameter. For example, to disable the symlink()
and system()
functions, you would use:
disable_functions = "symlink,system"
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