如何在php中启用exec()? [英] How to enable exec() in php?
问题描述
我的exec功能未启用,我的一个文件需要此功能.如果可能的话,我想在我的php代码中启用它,而不必在我的php.ini文件中进行更改.
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.
谢谢
推荐答案
The setting you need to change is disable_functions
and as per the description in the manual:
此伪指令必须在php.ini中设置.例如,您不能在httpd.conf中进行设置.
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.
话虽如此,通常有一种解决方法,因此您根本不需要使用exec.可能值得在另一个问题中解释您正在尝试做什么,看看是否有可能.
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.
这篇关于如何在php中启用exec()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!