Get name of file that is including a PHP script

后端 未结 6 2008
遇见更好的自我
遇见更好的自我 2020-12-16 11:22

Here is an example of what I am trying to do:

index.php

list.php

6条回答
  •  粉色の甜心
    2020-12-16 12:13

    In the code including list.php, before you include, you can set a variable called $this_page and then list.php can see the test for the value of $this_page and act accordingly.

提交回复
热议问题