ErrorException #1 Allowed memory size of 134217728 bytes exhausted (tried to allocate 39923713 bytes) 搜索问题 → APPPATH/Library/Image.php at line 1802 1795 1796 $color = imagecolorallocate($target_image, 255, 255, 255); //2.上色 1797 imagecolortransparent($target_image, $color); //3.设置透明色 1798 imagefill($target_image, 0, 0, $color); //4.填充透明色 1799 1800 $color = imagecolorallocate($cropped_image, 255, 255, 255); //2.上色 1801 imagecolortransparent($cropped_image, $color); //3.设置透明色 1802 imagefill($cropped_image, 0, 0, $color); //4.填充透明色 1803 1804 // copy 1805 imagecopy($cropped_image, $source_image, 0, 0, $source_x, $source_y, $cropped_width, $cropped_height); 1806 // zoom 1807 imagecopyresampled($target_image, $cropped_image, 0, 0, 0, 0, $target_width, $target_height, $cropped_width, $cropped_height); 1808 1809 header('Content-Type:image/png'); Backtrace Server Request Response Files Memory {PHP internal code} — CodeIgniter\Debug\Exceptions->shutdownHandler () Displayed at 09:12:18am — PHP: 7.3.21 — CodeIgniter: 4.1.9