简体   繁体   中英

imagecreatefromstring returns broken image?

I'm following this example for imagecreatefromstring() .

It happens when I'm using the image data that I'm working with. However even when I'm using the the base64 string for the image from the manual (linked above), I still get the same issue. imagecreatefromstring isn't returning false either. However, on Safari and Chrome, I just get a broken image. Here's a screenshot of what it looks like on Chrome.

在此处输入图片说明

The problem was that there was a PHP error that was printed right before the createimagefromstring chunk of code was called, thereby breaking the image. The problem for my code specifically was related ldap_close().

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM