按照官方的默认配置
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 === '/',
]
]
]
但是过一会儿,他又更新了,是不是更新不及时
文档有说,-d 默认不支持文件监控
如果你需要 -d 支持文件监控,则手动设置 'enable_file_monitor' => true
不加-d 监控不生效