Is there a way to disable eval function without doing so from php.ini file. I have tried ini_set function but even that doesn't work.
Basically I want my framework users to decide whether this function should be enabled or not through a config file. If they say no, i should be able to disable it using code as i can't go to server of each users where my framework is installed and disabling it using php.ini file.
As i said without goint to php.ini file, so ini directive disable_functions should not be posted in answers.
Please help.
It won't work, because eval() is not a function - it's a language construct. You can disable it with suhosin, a protection system for PHP. That's the only way I know of.
From PHP.net:
Note: Because this is a language construct and not a function, it cannot be called using variable functions
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