我怎麼能認識到這一點:通過進入鏈接實現用戶重定向用PHP
當用戶進入
mysite.com/index.php?g=123
他將被重定向到mysite.com/123。
對於任何其他進入的值也是如此。例如:mysite.com/?g=456> mysite/456; mysite.com/?g=789> mysite/789;等 我都試過了,但我知道,這種方式是錯誤的:
<?php
$g = checkValues($_REQUEST['g']);
if($g)
{
header("Location: index.php/$g");
}
?>
謝謝!
'位置絕招 : index.php/###'但你要求'mysite.com/###' – 2015-07-12 23:50:23
你能告訴我們你的'checkValues'函數嗎?請 – zilongqiu