【发布时间】:2016-07-24 19:18:45
【问题描述】:
我将我的 laravel 应用程序托管在一个烧焦的主机中,我将我的 laravel 项目上传到根目录,并将我的公共文件夹上传到 public_html 目录。
我想将图像保存在avater_img 或assistant_img 或doctor_img。
为此我编写了这段代码
$file = Input::file('photo');
if($file != ""){
$ext = $file->getClientOriginalName();
$file_name = rand(10000,50000).'.'. $ext;
$image = Image::make(Input::file('photo'));
$image->resize(300,300);
$image->save(public_path() . '/doctor_img/' . $file_name);
}
我该如何解决这个错误
【问题讨论】:
-
Google 对这个错误有什么看法?您是否尝试过 Google 建议的任何修复?如果是,那后来发生了什么?
-
试着看看这个答案:stackoverflow.com/a/19923994/2079781 虽然你可能需要改变一些东西才能在 Laravel 5.2 上工作。
标签: php image laravel-5.2