Closed twomiao closed 2 years ago
$class = str_replace('/', "\\", substr(substr($file, strlen(base_path())), 0, -4));
$class = str_replace([base_path(), '/', '.php'], ["", "\\", ''], $file);
这样看起来更容易明白
$class = str_replace('/', "\\", substr(substr($file, strlen(base_path())), 0, -4));
$class = str_replace([base_path(), '/', '.php'], ["", "\\", ''], $file);