Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/249.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在另一个目录中使用Prestashop的Image类_Php_Prestashop - Fatal编程技术网

Php 在另一个目录中使用Prestashop的Image类

Php 在另一个目录中使用Prestashop的Image类,php,prestashop,Php,Prestashop,我面对的事情似乎很简单,但我只是被卡住了 我试图在脚本中使用Prestashop的Image类来处理图像的大小调整。之后使用 所以 我的脚本位于: 电子数据交换/模块/文章 图片课正在上课 因此,如果我想使用脚本中的Picture类,我可以这样做: include_once (ROOT_PATH . '/config/config.inc.php'); include_once (ROOT_PATH . '/classes/Image.php'); 这就是我被困的地方,php说: 致命错误:在

我面对的事情似乎很简单,但我只是被卡住了

我试图在脚本中使用Prestashop的Image类来处理图像的大小调整。之后使用

所以

我的脚本位于:

电子数据交换/模块/文章

图片课正在上课

因此,如果我想使用脚本中的Picture类,我可以这样做:

include_once (ROOT_PATH . '/config/config.inc.php');
include_once (ROOT_PATH . '/classes/Image.php');
这就是我被困的地方,php说:

致命错误:在第65行的..../config/alias.php中调用未定义的方法DB::getInstance

这是从

function pSQL($string, $htmlOK = false)
{
    // Avoid thousands of "Db::getInstance()"...
    static $db = false;
    
    if (!$db)
        $db = Db::getInstance(); <============= HERE 

    return $db->escape($string, $htmlOK);
}

我们有一个blog智能blog,其中使用类似config.php的bellow代码

require_once(dirname(__FILE__).'../../../config/config.inc.php');
require_once(dirname(__FILE__).'../../../init.php');
require_once(dirname(__FILE__).'../../../config/config.inc.php');
require_once(dirname(__FILE__).'../../../init.php');