当前位置:网站首页>ecshop安装的时候提示不支持JPEG格式
ecshop安装的时候提示不支持JPEG格式
2022-07-31 08:24:00 【正在吞噬的世界】
检测环境的时候提示:是否支持 JPEG是不支持的。
```c
解决一:查看发现有libjpeg.lib库,GD2库也有,都加载了,也都正常。查看ecshop源代码发现install/includes/lib_installer.php中第100行,JPEG写成了JPG,对图片格式的验证。
$gd_info = gd_info();
$jpeg_enabled = ($gd_info['JPG Support'] === true) ? $_LANG['support'] :$_LANG['not_support'];
$gif_enabled = ($gd_info['GIF Create Support'] === true) ? $_LANG['support'] :$_LANG['not_support'];
$png_enabled = ($gd_info['PNG Support'] === true) ? $_LANG['support'] :$_LANG['not_support'];
可用看到是对$gd_info值检验来看是否支持某个图片类型的,打印这个数组,可用看到其是支持JPEG的,$gd_info['JPEG Support']是存在的,$gd_info['JPG Support']不存在。所以将$gd_info['JPG Support'] 修改为$gd_info['JPEG Support']即可。
正确的应该是:
$jpeg_enabled = ($gd_info['JPEG Support'] === true) ? $_LANG['support'] : $_LANG['not_support'];
为何说Ecshop写错了,因为我打印数组$gd_info的时候,里面的键名是:JPEG Support。而$gd_info数组里的值都是直接调用系统环境变量的。
边栏推荐
猜你喜欢

Flutter Paystack implements all options

google搜索技巧——程序员推荐
![[Yellow ah code] Introduction to MySQL - 3. I use select, the boss directly drives me to take the train home, and I still buy a station ticket](/img/7b/f50c5f4b16a376273ba8cd27543676.png)
[Yellow ah code] Introduction to MySQL - 3. I use select, the boss directly drives me to take the train home, and I still buy a station ticket

高并发-高可用-高性能

剑指offer-解决面试题的思路

功能强大的国产Api管理工具

【云原生】微服务之Feign的介绍与使用

【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)

MySQL 8.0.29 解压版安装教程(亲测有效)

Ubuntu22.04安装mysql
随机推荐
Install the deployment kubernetes KubeSphere management
SQL 嵌套 N 层太长太难写怎么办?
剑指offer-解决面试题的思路
C语言三子棋(井字棋)小游戏
哪些字符串会被FastJson解析为null呢
[Yellow ah code] Introduction to MySQL - 3. I use select, the boss directly drives me to take the train home, and I still buy a station ticket
【MySQL功法】第3话 · MySQL中常见的数据类型
I advise those juniors and juniors who have just started working: If you want to enter a big factory, you must master these core skills!Complete Learning Route!
[转载] Virtual Studio 让系统找到需要的头文件和库
@RequestBody和@RequestParam区别
六、MFC文档类(单文档和多文档)
SSM框架简单介绍
【黄啊码】MySQL入门—3、我用select ,老板直接赶我坐火车回家去,买的还是站票
MySQL安装教程
【问题记录】TypeError: eval() arg 1 must be a string, bytes or code object
科目三:右转弯
MySQL 数据库基础知识(系统化一篇入门)
SQL 入门之第一讲——MySQL 8.0.29安装教程(windows 64位)
How to Install MySQL on Linux
刷题《剑指Offer》day05