require(vendor/autoload.php): failed to open stream

前端 未结 16 1432
梦毁少年i
梦毁少年i 2020-11-29 18:02

I know that this issue has been posted many times, but for me it seems to be a different problem.

Indeed, this error

Warning: require(vendor/autol

16条回答
  •  既然无缘
    2020-11-29 18:18

    Create composer.json file with requisite library for ex:

    {
        "require": {
            "mpdf/mpdf": "^6.1"
        }
    }
    

    Execute the below command where composer.json exists:

    composer install
    

    In case of Drupal :

    Use the web root folder of drupal to include autoload for ex:

    define('DRUPAL_ROOT', getcwd());
    require_once DRUPAL_ROOT . '/vendor/autoload.php';
    

    In case of other systems: Use the root folder variable or location to include the autoload.php

提交回复
热议问题