我想动态地打开一个PNG映像,但是imagecreatefrompng()的行为很奇怪。如果我提供了一个明确的路径,比如:
$our_image = imagecreatefrompng("https://example.com/customfiles/avatars/avatar2.png");它工作得很好,但是如果我尝试提交一个字符串:
$our_image = imagecreatefrompng("https://example.com/customfiles/avatars/".$a);它不起作用。当我输出变量$a时,我看到它等于avatar2.png
另外,gettype()说$a是一个字符串。
发布于 2019-04-08 23:03:39
文件名的更改有所帮助。似乎浏览器从现金中提取了旧文件。
https://stackoverflow.com/questions/55563923
复制相似问题