thinkphp5框架内报错 Class 'think\Image' not found

 

引用方式如下 \think\image::open($imgSrc);

类的命名空间没有错误,检查了下,发现应该是框架的依赖自动注入出错,

最简单的解决方法是把 ./vendor/topthink/think-image/src下的文件(包括image.php和image文件夹)

移动到 ./thinkphp/library/think 目录下,

再回到原来的程序中,就不会报错了

posted @ 2021-06-10 10:41  blog_zss小帅-博客猿  阅读(935)  评论(0编辑  收藏  举报