0
到目前爲止一切良好,這可是.....
$custom_path= "musical_instruments";
echo '< a href='$custom_path' >custom link< /a>'
我可以在頁面中使用$_GEt["custom_path"]
我重定向
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ localhost/folder/folder/stuff.php?custom_path=$1
如何發送多個$_GET
變量形成一個自定義鏈接,以便我可以在我重定向到的頁面中使用它們?
我做到了這一點,但不是很我想知道:
$custom_path = "category=$category&item_name=$url&item_id=$id";
PHP
$custom_path= "musical_instruments";
$item_name= "guitar";
$item_id= 123;
echo '< a href='$custom_path&$item_name&$item_id' >custom link< /a>'
htaccess的
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ localhost/folder/folder/stuff.php?custom_path=$1&item_name=$2&item_id=$3
我如何可以訪問變量$ 1 ,2美元和3美元的自定義鏈接?我在做自定義鏈接的方式做錯了什麼?
使用某物像'^(。*) &(。*)&(。*)$''如果你想使用'&'作爲分隔符,但是標準是使用'/'而不是 – kero 2014-12-05 22:37:57
你的回顯行是無效的php – 2014-12-05 22:48:22
你能告訴我如何正確地建立一個自定義鏈接訪問它與htaccess文件? – nero 2014-12-05 22:52:38