import('Action.McorpworkerAction', APP_PATH . 'Modules/base');//自己加载base模块的action import('Model.CorpworkerModel', APP_PATH . 'Modules/base'); //自己加载base模块的model,不然自动验证等等model中的方法会失效 $Mworker = new McorpworkerAction();实例化action,注意要写全啊 $worker["loginname"] =$_REQUEST['loginname']; $worker["realname"] =$_REQUEST['realname']; $worker["pass"] =mmin($_REQUEST['pass']); //构造数据后添加 $r = $Mworker->addfun($worker); //这样才能顺利调用base模块的 Mcorpworker的增删改查!!
希望本文所述对大家的ThinkPHP框架程序设计有所帮助。