Example #1
0
 /**
  * 生成默认的配置文件、控制器
  * @author Colin <*****@*****.**>
  */
 public static function outDefaultFile()
 {
     //生成默认的配置文件
     if (!file_exists(ConfDIR . '/config.php')) {
         file_put_contents(ConfDIR . '/config.php', View::createConfig());
     }
     //生成默认的配置文件
     if (!file_exists(ConfDIR . '/template.php')) {
         file_put_contents(ConfDIR . '/template.php', View::createTemplate());
     }
     //生成默认的控制器
     if (!file_exists(ControllerDIR . '/IndexController.class.php')) {
         file_put_contents(ControllerDIR . '/IndexController.class.php', View::createIndex());
     }
 }