以下代码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
答案 0 :(得分:1)
使用
require_once __DIR__.'/vendor/autoload.php';