$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));
?>