当前位置:网站首页>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数组里的值都是直接调用系统环境变量的。
边栏推荐
- UML图及在drawio中的绘制
- 35-Jenkins-Shared library application
- 搭建frp进行内网穿透
- [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
- sqli-labs(less-11)
- 【C#】说说 C# 9 新特性的实际运用
- MySQL 数据库基础知识(系统化一篇入门)
- 期刊会议排名、信息检索网站推荐以及IEEE Latex模板下载
- 使用MySQL如何查询一年中每月的记录数
- 【MySQL功法】第4话 · 和kiko一起探索MySQL中的运算符
猜你喜欢

XSS详解

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

Flutter Paystack implements all options

高并发-高可用-高性能

高并发高可用高性能的解决方案

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!

48页智慧城市规划蓝图 解决方案

Read Elephant Swap in one article, why does it bring such a high premium to ePLATO?

Practical Bioinformatics 2: Multi-omics data integration and mining

Install the deployment kubernetes KubeSphere management
随机推荐
数组every和some方法的区别?
Small application project development, jingdong mall 】 【 uni - app custom search component (below) - search history
【MySQL功法】第2话 · 数据库与数据表的基本操作
PowerCLi 通过自建PXE Server一键esxi7下批量部署常规New-VM
Unreal基础概念
How to Install MySQL on Linux
ScheduledExecutorService - 定时周期执行任务
使用MySQL如何查询一年中每月的记录数
【云原生&微服务五】Ribbon负载均衡策略之随机ThreadLocalRandom
torch分布式训练
[Mini Program Project Development--Jingdong Mall] Custom Search Component of uni-app (Part 1)--Component UI
A, MySQL principle of master-slave replication
【C#】判断字符串中是否包含指定字符或字符串(Contains/IndexOf)
蚂蚁核心科技产品亮相数字中国建设峰会 持续助力企业数字化转型
【C#】说说 C# 9 新特性的实际运用
控制文本保留几行,末尾省略
Vue项目通过node连接MySQL数据库并实现增删改查操作
关于@Autowired
循环结构--for循环
【pytorch记录】pytorch的分布式 torch.distributed.launch 命令在做什么呢