设置使用Apache的.htaccess一个PHP $ _SERVER值($ _ SERVER ['东西'])东西、PHP、htaccess、Apache

2023-09-02 09:49:37 作者:丫头我当女汉子

使用的.htaccess或其他apache的权力,设置在PHP数组$ _ SERVER自定义服务器值是否有可能。

Is it possible using .htaccess or other apache powers to set a custom server value in the php array $_SERVER.

例如

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

我意识到我问了很多问题,答案是没有那么随意说出这样的话。

I realize I ask a lot of questions that the answer is no so feel free to say so.

推荐答案

尝试 SETENV 指令:

SetEnv is_special foobar