虚拟主机域名注册-常见问题 → 网络编程问题 → PHP | |||||||
PHP imagecreatefromstring() 检查图片是否损坏
利用PHP函数 imagecreatefromstring() 来读取图片信息 $pic_url = 'https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/logo_white_fe6da1ec.png'; $data = file_get_contents($pic_url); $pic_status = imagecreatefromstring($data); if( $pic_status != false ){ echo '图片状态正常!!'; }else{ echo '图片已损坏!!'; }
|
|||||||
>> 相关文章 | |||||||
没有相关文章。 | |||||||
发表评论 | |||||||