How To Identify The Requested Page In PHP

后端 未结 5 1377
栀梦
栀梦 2021-02-04 04:59

Is there any easy way to identify the file initially handling the request, ignoring get arguments and handling (at least basic) mappings like / to /index.php<

5条回答
  •  不知归路
    2021-02-04 05:23

    Its very old question and not very clear too. What I understood is that you want to know which page is sending request GET/POST. This can be implemented by:

    $_SERVER['HTTP_REFERER']

    Now, to get the actual page name, write like: = basename($_SERVER['HTTP_REFERER']);

    This will solve you concern.

提交回复
热议问题