admin avatar

wordpress A TimThumb error has occured的解决方法

🕜 by admin

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

1
2
3
4
5
6
7
8
9
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文件,添加以下代码即可

1
2
3
4
5
6
7
8
//define ('VERSION', '2.8.14');
if(! isset($ALLOWED_SITES)){
$ALLOWED_SITES = array (
'youdomace.com',
'cdn.youdomace.com',
'other.domcae.com',
);
}

保持即可

💘 相关文章

写一条评论