我又来了。我不想打扰,但这里还有另一个有趣的事情。
我有一个定制的购物车,页面中有一些动态链接,当它们在浏览器中提供时,会将 $name 替换为产品名称,将 $p 替换为产品 ID 号。我的目标是在页面上建立一个如下链接: http://www.something.com/buy/ProductName/382793/
我得到的是 http://www .something.com/buy/ProductName/0/382793
并且没有尾部斜杠。一定要有斜线啊
代码如下所示:产品链接
您可以看到我的 $name 和 $p 用斜杠分隔,末尾有一个斜杠,但它不起作用。女士们先生们有什么想法吗?
Here I am again. I hate to be a bother but here's another zinger.
I have a custom made shopping cart and have some dynamic links in the page that when served up in a browser will replace $name with the product name and $p with the procuct id number. I'm aiming for a link on the page like this: http://www.something.com/buy/ProductName/382793/
What I'm getting is http://www.something.com/buy/ProductName/0/382793
and no trailing slash. Gotta have the slash.
The code looks like this: <a title=\"View Product.\" href=\"http://www.something.com/buy/$name/$p/". $line["PID"]. "\">PRODUCT LINKO</a>
You can see that I have $name and $p separated by a slash and a trailing slash at the end but it's not working. Any ideas ladies and gentlemen?
发布评论
评论(1)
末尾的“尾部”斜杠转义双引号:
应根据要求添加尾部斜杠。
The "tailing" slash at the end is escaping the double quote:
Should add the tailing slash as requested.