Reintroduce $HTTP_POST_VARS in PHP 5.3

后端 未结 4 1595
生来不讨喜
生来不讨喜 2020-12-09 05:31

I need to run a legacy PHP application in a shared hosting environment. I have promised my customer I\'ll support that legacy application for some time but I found that it d

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-09 06:10

    It looks like the following can work.

    First, create an edisplaypatch.php somewhere with following code

    
    

    This code can be generalized and reused with any other program requiring the old long arrays

    Then in Apache's vhost configuration add

    SetEnv EDISPLAY_PATCH true
    

    Reload Apache.

    Test code works: if SetEnv is not present doesn't show nothing, if present shows what you send as rnd parameter in querystring

    
    

    Little drawback: I'm including a file on EVERY PHP request

提交回复
热议问题