mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 14:02:47 +08:00
修正Create类和Model类
This commit is contained in:
@@ -52,7 +52,7 @@ class Create {
|
||||
case 'Model': // 模型
|
||||
$filename = ucwords($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 Model{\n}");
|
||||
file_put_contents(APP_PATH.$module.'/'.$path.'/'.$filename.'.php',"<?php\nnamespace {$module}\\{$path};\nclass {$filename} extends \Think\Model{\n}");
|
||||
}
|
||||
break;
|
||||
case 'View': // 视图
|
||||
|
||||
@@ -174,7 +174,7 @@ class Model {
|
||||
}elseif(isset($this->_scope[$method])){// 命名范围的单独调用支持
|
||||
return $this->scope($method,$args[0]);
|
||||
}else{
|
||||
throw exception(__CLASS__.':'.$method.L('_METHOD_NOT_EXIST_'));
|
||||
E(__CLASS__.':'.$method.L('_METHOD_NOT_EXIST_'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user