WideImage::load($category)->resize(29,28)不适用于包含@2x。。。我收到这个错误
警告:file_get_contents(http://...@2x.png)[function.file-get-contents]:无法打开流:
示例
http://myurl/icon_filter04@2x.png
当我使用一个没有@2x的链接时,它的效果很好
这是我的代码:
WideImage::load($category)->resize(29, 28)->saveToFile('img/category/'.$temp_name_category.'');
当你的路径中有这些符号时,你应该始终urlencode
你的路径:
! * ' ( ) ; : @ & = + $ , / ? % # [ ]
尝试:http://myurl/icon_filter04%402x.png
@
符号是URL中的保留字符。
如果您有一个包含@
符号的URL,则必须对其进行转义。
使用urlencode()
对URL进行安全编码。
$safeFilename = "http://murl/".urlencode("icon_filter04@2x.png");
希望能有所帮助。
您需要逃离@,因此http://myurl/icon_filter04%402x.png