我有一個WordPress頁面有特殊字符
$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代碼的PHP腳本的URL,我已經用單引號試了幾個可能的招數,等等 但我可以想不出來...有什麼想法?
或者試試這個'htmlspecialchars($ str);' –
@ marilena6我想你忘了標記一個答案作爲正確的答案。 – tomloprod