gpt4 book ai didi

php - 使用 Apache .htaccess 设置 Php $_SERVER 值 ($_SERVER ['something' ])

转载 作者:IT王子 更新时间:2023-10-28 23:45:25 28 4
gpt4 key购买 nike

是否可以使用 .htaccess 或其他 apache 功能在 php 数组 $_SERVER 中设置自定义服务器值。

例如

if($_SERVER['is_special']) {
echo "Yeah for us!";
} else {
echo "No you fool!";
}

我意识到我问了很多问题,但答案是否定的,所以尽管这么说。

最佳答案

试试 SetEnv directive :

SetEnv is_special foobar

关于php - 使用 Apache .htaccess 设置 Php $_SERVER 值 ($_SERVER ['something' ]),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/612228/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com