wordpress A TimThumb error has occured的解决方法

Tuesday, Nov 17, 2020 | 1 minute read | Updated at Tuesday, Nov 17, 2020

@

wordpress缩略图出现了下面的错误

A TimThumb error has occured
The following error(s) occured:
An error occured fetching image.


A TimThumb error has occured
The following error(s) occured:
You may not fetch images from that site. To enable this site in timthumb, you can either add it to $ALLOWED_SITES and set ALLOW_EXTERNAL=true. Or you can set ALLOW_ALL_EXTERNAL_SITES=true, depending on your security needs.

解决方法,编辑主题目录下的timthumb.php文件,添加以下代码即可

//define ('VERSION', '2.8.14');
if(! isset($ALLOWED_SITES)){
$ALLOWED_SITES = array (
'youdomace.com',
'cdn.youdomace.com',
'other.domcae.com',
);
}

保持即可

© 2018 - 2026 vpslala

🌱 Powered by Hugo with theme Dream.