开发者

Php, I want to add a parameter for redirections in ALL links, how to do that?

开发者 https://www.devze.com 2023-04-01 00:17 出处:网络
Lets imagine a \"language\" parameter in every GET request. I must add this parameter to all request. Its OK to just type it in php code, but if I have thousan开发者_如何学编程ds \"header()\" calls, w

Lets imagine a "language" parameter in every GET request. I must add this parameter to all request. Its OK to just type it in php code, but if I have thousan开发者_如何学编程ds "header()" calls, what to do? Not mentioned the HTML/Javascript links. Sessions not an option, sorry


How is this different from any other get parameter? If you require it, then your code needs to pass the value around, just as it must pass around any other get parameters that need to be retained and added to other links or Location: headers. If this represents a major logistical issue for you, you might consider the design of your controller system, and overall framework for dealing with requests and url parameters.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号