第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 php 7.4.10 版本上啟用 Webp 支持?

如何在 php 7.4.10 版本上啟用 Webp 支持?

PHP
紫衣仙女 2024-01-19 16:58:06
我正在 Red Hat Linux 86_64 服務(wù)器上使用 php 7.4.10 版本,我想在用戶上傳圖像后將所有圖像自動轉(zhuǎn)換為 webp 擴展名。我有 php 代碼,可以正常上傳圖像,但是當(dāng)我嘗試上傳圖像時,出現(xiàn)以下錯誤:Fatal error: Uncaught Error: Call to undefined function imagewebp() in....當(dāng)我收到上面的錯誤時,我在頁面上輸入了var_dump (gd_info()),之后我得到了以下信息:array(14) { ["GD Version"]=> string(26) "bundled (2.1.0 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPEG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(true) ["XBM Support"]=> bool(true) ["WebP Support"]=> bool(false) ["BMP Support"]=> bool(true) ["TGA Read Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }根據(jù)上面的數(shù)組結(jié)果,Webp 支持被檢查為 false:["WebP Support"]=> bool(false)在這種情況下,我如何啟用 WebP 支持["WebP Support"]=> bool(true)?我發(fā)現(xiàn)了一些與我的疑問相關(guān)的類似問題:更新GD版本以支持PHP 7.3的Webp如何編譯php以啟用webp支持?在 LiteSpeed 上運行的 Ubuntu 18.04 上啟用 GD 庫中的 WebP 支持但不幸的是我沒有找到在我的服務(wù)器上啟用 webp 支持的正確方法。
查看完整描述

1 回答

?
繁花如伊

TA貢獻2012條經(jīng)驗 獲得超12個贊

在全新安裝的 php 中,添加 gd 會sudo apt install php7.4-gd自動啟用 webp。phpinfo() 中的輸出;是:


gd

GD Support  enabled

GD headers Version  2.3.0

GD library Version  2.3.0

FreeType Support    enabled

FreeType Linkage    with freetype

GIF Read Support    enabled

GIF Create Support  enabled

JPEG Support    enabled

PNG Support     enabled

WBMP Support    enabled

XPM Support     enabled

XBM Support     enabled

WebP Support    enabled

BMP Support     enabled

TGA Read Support    enabled 


查看完整回答
反對 回復(fù) 2024-01-19
  • 1 回答
  • 0 關(guān)注
  • 203 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號