最新版本中,因遷移helpers.php和修改常量BASE_PATH為獲取當(dāng)前腳本路徑,導(dǎo)致自定義腳本路徑報(bào)錯(cuò)的BUG
//獲取當(dāng)前腳本路徑
if (!defined('BASE_PATH')) {
define('BASE_PATH', Phar::running() ?: getcwd());
}
//這里會報(bào)找不到當(dāng)前腳本xxxx/config目錄的錯(cuò)誤:
function config_path(string $path = ''): string
{
return path_combine(BASE_PATH . DIRECTORY_SEPARATOR . 'config', $path);
}
//舊版本文件helpers.php常量BASE_PATH是固定的:
define('BASE_PATH', dirname(__DIR__));
自定義腳本:
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../support/bootstrap.php';
echo 'start';
webman版本:v1.6.8