dir /b 1.bat
(^.*$)
替换为ren $1 \L$0
。<foreach(.*)>
改为{foreach$1}
</foreach>
改为{/foreach}
<if (.*)>
改为 {if $1}
</if>
改为 {/if}
<else/>
改为{else/}
<block(.*)">
改为{block$1"}
</block>
改为 {/block}
data.info
改为 data.msg
data.status
改为 data.code
use Think\Model;
改为 use think\Db
U\(‘(.*)/
改为 url\(‘\L$1/
{:U(‘index‘)}
改为 {:url(‘index‘)}
U()
改为 url()
dir /b 1.bat
(.*)Controller.class.php
替换为ren $0 $1.php
$this->display();
改为return view();
\$this->display\(‘(.*)‘\);
改为namespace (Chrent)\\Controller;
改为 namespace app\\$1\\controller;
class (.*)Controller extends .*Controller
改为 class $1 extends \\think\\Controller
在application\common.php中加入
use think\Request;
define('IS_GET',Request::instance()->isGet());
define('IS_POST',Request::instance()->isPost());
define('IS_AJAX',Request::instance()->isAjax());
原文:https://www.cnblogs.com/shy-/p/10447827.html