cakephp 3如何使用插件(想象一下)

时间:2016-07-25 13:05:03

标签: php cakephp-3.2

在我的蛋糕应用程序中需要Imagine,但我如何在Controller中创建类Imagine的实例。

插件由作曲家安装,所有文件都在供应商文件夹中。

此:

 require 'vendor/autoload.php';
 $imagine = new Imagine\Gd\Imagine(); 

不起作用。

我明白了:

  

require(vendor / autoload.php):无法打开流:没有这样的文件或   目录[APP / Controller \ ArticlesController.php,第100行]致命   错误:require()[function.require]:需要打开失败   '供应商/ autoload.php' (include_path =' C:\ xampp \ php \ PEAR')in   C:\ xampp \ htdocs \ cakephp_blog \ src \ Controller \ ArticlesController.php on   第100行

0 个答案:

没有答案