[英]How to store php page name in variable?
I have a php page (running locally): 我有一个php页面(在本地运行):
http://localhost/webpagefolder/home.php
When a different page is clickedon the URL changes to reflect it. 单击其他页面时,URL会更改以反映该页面。 So it now becomes:
现在变成:
http://localhost/webpagefolder/home.php?here=delivery
because I have selected the delivery page. 因为我选择了交货页面。
How would I store the part after the = in a variable? 如何将=之后的零件存储在变量中?
Something like $name = delivery
(or whatever is displayed after the =
) $name = delivery
类的东西(或=
之后显示的内容)
Thanks in advance 提前致谢
In PHP all the GET-variables are stored in the $_GET
super global. 在PHP中,所有GET变量都存储在
$_GET
超级全局变量中。 In your example $_GET['here']
should contain 'delivery'. 在您的示例中,
$_GET['here']
_ $_GET['here']
应包含“送货”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.