PHP header [removed] - what are the implications?

前端 未结 5 1986
暖寄归人
暖寄归人 2021-02-01 12:18

I have domain.com. If the user is logged in, it should load automatically domain.com/option-X where X is a predefined choice of the user.

5条回答
  •  广开言路
    2021-02-01 13:05

    Just a tip: using http_response_code is much easier to remember than writing the full header:

    http_response_code(301);
    header('Location: /option-a'); 
    exit;
    

提交回复
热议问题