按官方的源配置,文件监控时常不生效

xjcallen

问题描述

按照官方的默认配置
php webman start -d
修改控制器后浏览器刷新不变
php webman reload 后生效了
但是频繁的修改控制器文件后就不更新了,必须要
php webman reload

程序代码或配置

 'monitor' => [
        'handler' => app\process\Monitor::class,
        'reloadable' => false,
        'constructor' => [
            // Monitor these directories
            'monitorDir' => array_merge([app_path(), config_path()]),
            // Files with these suffixes will be monitored
            'monitorExtensions' => ['php', 'html', 'htm', 'env'],
            'options' => [
                'enable_file_monitor' => !in_array('-d', $argv) && DIRECTORY_SEPARATOR === '/',
                'enable_memory_monitor' => DIRECTORY_SEPARATOR === '/',
            ]
        ]
    ]
137 2 0
2个回答

xjcallen

但是过一会儿,他又更新了,是不是更新不及时

  • 暂无评论

文档有说,-d 默认不支持文件监控
如果你需要 -d 支持文件监控,则手动设置 'enable_file_monitor' => true

🔝