Home  >  Article  >  Backend Development  >  ini_set、putenv等函数的作用范围是什么呢,大局还是只限于本网站

ini_set、putenv等函数的作用范围是什么呢,大局还是只限于本网站

WBOY
WBOYOriginal
2016-06-13 11:48:391121browse

ini_set、putenv等函数的作用范围是什么呢,全局还是只限于本网站?
官网上对这两个函数的说明是,所做的修改在脚本执行时有效。
但没有说这个修改是对本网站有效还是对全局有效。如果是对全局有效的话,是不是可以通过这些函数修改默认的全局PHP安全设置,导致安全问题。

有人知道它的作用范围吗,或者可以通过什么样的方式来测试它的作用范围?
另外有没有必要在disable_functions里禁用它们,正常的网站程序用到它们的情况多吗?


------解决方案--------------------
ini_set 当前脚本运行时 脚本运行结束即结束
putenv 存活于当前会话 请求结束就结束
------解决方案--------------------
只对当次运行有效 就像你设置的常量

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn