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