【发布时间】:2015-02-27 01:17:12
【问题描述】:
我正在使用[Intervention][1] 来调整文件大小。我发现它没有调整像this one这样的大文件的大小
我使用的代码是:
if (Input::hasFile('image'))
{
$file = Input::file('image');
$r = $file->move('uploads', $file->getClientOriginalName());
Image::make('/mountain.jpg')->resize(200,200)->save('uploads/k2.jpg');
//print_r($image);
exit;
}
代码适用于较小的文件。文件大小为 2.x MB,我的 PHP 限制为 32MB。
更新:Laravel 日志说:
' with message 'Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes`
【问题讨论】:
-
你有什么错误吗?
-
至少不在应用程序级别。我应该检查日志吗?
-
@MattBurrow 是的,我找到了这个:
' with message 'Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes -
在 php.ini 中增加
memory_limit值。