webp를 지원하지 않는 서버에서 경고 문구를 출력함

This commit is contained in:
Cloud User
2021-07-24 06:16:22 +00:00
parent d76b371a58
commit 3f97138715

View File

@ -1530,4 +1530,13 @@ if($config['cf_cert_use']) {
}
}
if (stripos($config['cf_image_extension'], "webp") !== false) {
if (!file_exists("imagewebp")) {
echo '<script>'.PHP_EOL;
echo 'alert("이 서버는 webp 이미지를 지원하고 있지 않습니다.\n이미지 업로드 확장자에서 webp 확장자를 제거해 주십시오.\n제거하지 않으면 이미지와 관련된 오류가 발생할 수 있습니다.");'.PHP_EOL;
echo 'document.getElementById("cf_image_extension").focus();'.PHP_EOL;
echo '</script>'.PHP_EOL;
}
}
include_once ('./admin.tail.php');