gpt4 book ai didi

Pinterest 描述中详细 url 的多个参数

转载 作者:行者123 更新时间:2023-12-05 00:33:08 25 4
gpt4 key购买 nike

我正在我的网站中集成 Pin it 功能,但我无法在 url 或 description 中传递多个参数。我已尝试使用以下代码

    $detail_wow_pin = $baseurl.'/wow/Wowitems/wowdetail?
obj_id='.$obj_id.'&obj_type='.$obj_type;

<a href="http://pinterest.com/pin/create/button/?
url=http://softprodigy.in/thinkbright/wow/Wowitems&media=<?=$wowimg?>
&description=<?='http://'.$_SERVER['SERVER_NAME'].''.$detail_wow_pin?>"
count-layout="none">
<img src="<?php echo IMG_WOWS; ?>/img/pinterest.png" alt="">
</a>

谢谢

最佳答案

我发现对整个 href 进行了正确的 url 编码,确认 & 符号 (&) 在 href 属性内编码为 & 。此外,& 在 url 参数内编码为 %26 并将 url 参数移动到 href 属性中的最后一个位置,当从您的固定板单击时,将正确创建返回包含图像的页面的链接。

例子:

<a href="//pinterest.com/pin/create/button/?media=http%3a%2f%2example.com%2fImages%2fimage.jpg&amp;description=Example+description.&amp;url=http%3A%2F%2Fexample.com%2FExample%2FExample.php%3Fparam1%3Dvalue1%26param2%3Dvalue2%26param3%3Dvalue3"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png"></a>

关于Pinterest 描述中详细 url 的多个参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12491895/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com