当前位置:网站首页>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数组里的值都是直接调用系统环境变量的。
边栏推荐
猜你喜欢

SQL 入门之第一讲——MySQL 8.0.29安装教程(windows 64位)

SSM整合案例分析(详解)

【云原生与5G】微服务加持5G核心网

【pytorch记录】pytorch的分布式 torch.distributed.launch 命令在做什么呢

PowerCLi 一键批量部署OVA 到esxi 7

【MySQL功法】第5话 · SQL单表查询

【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史
Doraemon teach you forwarded and redirect page

【MySQL功法】第3话 · MySQL中常见的数据类型
![[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
随机推荐
求职产品经理【九】求职季,如何写好一份简历?
Aleo Testnet3规划大纲
sqlmap使用教程大全命令大全(图文)
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史
Job hunting product manager [9] How to write a good resume in job hunting season?
Docker-compose安装mysql
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
Spark 在 Yarn 上运行 Spark 应用程序
[Cloud native] Introduction and use of Feign of microservices
MUI获取相机权限
【问题记录】TypeError: eval() arg 1 must be a string, bytes or code object
基于golang的swagger超贴心、超详细使用指南【有很多坑】
MySQL 数据库基础知识(系统化一篇入门)
高并发高可用高性能的解决方案
动态顺序表的增删查改(C语言实现)
02 Truffle TutorialToken 示例
信息收集-DNS
手写promise
mysql 数据去重的三种方式[实战]
重装系统后,hosts文件配置后不生效