国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

helpers.php中常量BASE_PATH變化導(dǎo)致自定義腳本路徑報(bào)錯(cuò)的BUG

wgole

問題描述

最新版本中,因遷移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__));

重現(xiàn)問題的步驟

自定義腳本:

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

echo 'start';

操作系統(tǒng)環(huán)境及workerman/webman等具體版本

webman版本:v1.6.8

477 1 0
1個(gè)回答

walkor 打賞

升級下
composer require workerman/webman-framework ^1.6.9

  • forwebreg 2024-12-11

    ?。恐苯影裩elpers.php干空了?

  • walkor 2024-12-11

    helpers.php 后續(xù)版本放到 vendor下了。
    老版本為了兼容 helpers.php 保留,但是內(nèi)容留空

  • forwebreg 2024-12-11

    回復(fù)真快 ????

??