创建调用者加载器类时出错

时间:2017-09-29 07:51:17

标签: php class classloader

以下代码start.php

<?php
require_once __DIR__ ."/../vandor/autoload.php";
?>

运行时,我遇到以下错误

Warning: require_once(C:\laragon\www\php\autoload\app/../vandor/autoload.php): failed to open stream: No such file or directory in C:\laragon\www\php\autoload\app\start.php on line 2

Fatal error: require_once(): Failed opening required 'C:\laragon\www\php\autoload\app/../vandor/autoload.php' (include_path='.;C:/laragon/etc/php/pear') in C:\laragon\www\php\autoload\app\start.php on line 2

1 个答案:

答案 0 :(得分:1)

使用

require_once  __DIR__.'/vendor/autoload.php';