问题
My exec function is not enabled, I need this function for one of my files. I would like to enable it inside my of php code if it's possible without having to make changes inside of my php.ini file.
Thank you
回答1:
The setting you need to change is disable_functions and as per the description in the manual:
This directive must be set in php.ini For example, you cannot set this in httpd.conf.
So unfortunately, the answer to your question is no.
With that said, there's usually a workaround so that you don't need to use exec at all. Might be worth explaining in a different question what you're trying to do and see if it's possible.
来源:https://stackoverflow.com/questions/58401997/how-to-enable-exec-in-php