gpt4 book ai didi

带有特殊字符的 Php 脚本 url

转载 作者:可可西里 更新时间:2023-11-01 01:00:48 24 4
gpt4 key购买 nike

我在 Wordpress 页面中有这个 php 代码

$str = 's.aspx?sm=Q830I7SJZvuSP3HzDfFlVA%3d%3d';

printf('<a href="https://www.surveymonkey.com/.urlencode($str)." target="_blank">
<img src="http://www.anyfood.gr/net/wp-content/uploads/2014/12/evaluation2.jpg" style="padding:20px;">
</a>'
);

但是链接不起作用,我尝试了几种可能的技巧,使用单引号等。但我想不通...有什么想法吗?

最佳答案

试试这个,它对我有用:

<?php
$str = 's.aspx?sm=Q830I7SJZvuSP3HzDfFlVA%3d%3d';

printf('<a href="https://www.surveymonkey.com/%1$s " target="_blank"> <img src="http://www.anyfood.gr/net/wp-content/uploads/2014/12/evaluation2.jpg" style="padding:20px;"> </a>', urlencode($str));
?>

关于带有特殊字符的 Php 脚本 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27655592/

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