[1] ErrorException in Image.php line 359

Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)

  1. //设置缩略图的坐标及宽度和高度
  2. $neww = $w * $scale;
  3. $newh = $h * $scale;
  4. $x = $this->info['width'] - $w;
  5. $y = $this->info['height'] - $h;
  6. $posx = ($width - $w * $scale) / 2;
  7. $posy = ($height - $h * $scale) / 2;
  8. do {
  9. //创建新图像
  10. $img = imagecreatetruecolor($width, $height);
  11. // 调整默认颜色
  12. $color = imagecolorallocate($img, 255, 255, 255);
  13. imagefill($img, 0, 0, $color);
  14. //裁剪
  15. imagecopyresampled($img, $this->im, $posx, $posy, $x, $y, $neww, $newh, $w, $h);
  16. imagedestroy($this->im); //销毁原图
  17. $this->im = $img;
  18. } while (!empty($this->gif) && $this->gifNext());
  19. $this->info['width'] = (int) $width;

Call Stack

  1. in Image.php line 359
  2. at Error::appShutdown()

Environment Variables

GET Data

id
8
POST Data
empty
Files
empty

Cookies

is_mobile
0
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_ACCEPT_ENCODING
gzip
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
www.omghehe.com
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
PATH_INFO
/Home/Goods/goodsInfo/id/8.html
REDIRECT_STATUS
200
SERVER_NAME
www.omghehe.com
SERVER_PORT
80
SERVER_ADDR
172.19.139.206
REMOTE_PORT
43906
REMOTE_ADDR
54.161.77.30
SERVER_SOFTWARE
nginx/1.8.1
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.omghehe.com
DOCUMENT_URI
/index.php
REQUEST_URI
/Home/Goods/goodsInfo/id/8.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/Home/Goods/goodsInfo/id/8.html
SCRIPT_FILENAME
/www/wwwroot/www.omghehe.com/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1540144001.7135
REQUEST_TIME
1540144001
Environment Variables
empty

ThinkPHP Constants

PLUGIN_PATH
/www/wwwroot/www.omghehe.com/plugins/
UPLOAD_PATH
public/upload/
TPSHOP_CACHE_TIME
1
SITE_URL
http://www.omghehe.com
INSTALL_DATE
1463741583
SERIALNUMBER
20160520065303oCWIoa
APP_PATH
/www/wwwroot/www.omghehe.com/application/
NOW_TIME
1540144001
THINK_VERSION
5.0.15
THINK_START_TIME
1540144001.7139
THINK_START_MEM
394648
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.omghehe.com/thinkphp/
LIB_PATH
/www/wwwroot/www.omghehe.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.omghehe.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.omghehe.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.omghehe.com/
EXTEND_PATH
/www/wwwroot/www.omghehe.com/extend/
VENDOR_PATH
/www/wwwroot/www.omghehe.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.omghehe.com/runtime/
LOG_PATH
/www/wwwroot/www.omghehe.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.omghehe.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.omghehe.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.omghehe.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
home
CONTROLLER_NAME
Goods
ACTION_NAME
goodsInfo
PREFIX
tp_
SESSION_ID