![](/img/trans.png)
[英]Replace string “white-spaces” with “comma” and remove all but 5 first words
[英]Problems with white-spaces in image-url
漂亮的旋轉木馬 ;) 感謝您的出色工作! 我發現了一個小“錯誤”:
如果圖片 url 包含任何空格,則不會顯示。 例如: http://webserver/pictures/my picture.jpg 返回: http://webserver/pictures/my%20picture.jpg顯示。
但是這個用於空白的“%20”html插入讓圖像沒有顯示在swiper中。 什么原因??
現在我已經修復了它:
foreach ($json_data as $Data => $imagelink) {
$image = str_replace(' ', '%20', $imagelink['imagelink']);
.....
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.