mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-04 06:12:48 +08:00
使用新的自动加载机制
preg_replace_callback取代/e模式
This commit is contained in:
@@ -47,13 +47,13 @@ class Create {
|
||||
foreach($file as $val){
|
||||
switch($path) {
|
||||
case 'controller':// 控制器
|
||||
$filename = ucwords($val).$path;
|
||||
$filename = strtolower($val).$path;
|
||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} {\n}");
|
||||
}
|
||||
break;
|
||||
case 'model': // 模型
|
||||
$filename = ucwords($val).$path;
|
||||
$filename = strtolower($val).$path;
|
||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} extends \Think\Model{\n}");
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class Create {
|
||||
case 'view': // 视图
|
||||
break;
|
||||
default:
|
||||
$filename = ucwords($val).$path;
|
||||
$filename = strtolower($val).$path;
|
||||
if(!is_file(APP_PATH.$module.'/'.$path.'/'.$filename.'.php')) {
|
||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} {\n}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user