Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>tp3->tp6New to Visual Studio Code? Get it now.
tp3->tp6

tp3->tp6

玄冰烈焰

|
783 installs
| (0) | Free
ThinkPHP版本3到6迁移助手
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

tp3--tp6 README

VSCODE ThinkPHP 版本3到版本6的迁移小助手.

功能

  1. 控制器php文件的匹配替换

php编辑界面->右键菜单->tp3-tp6 控制器替换

tp3 tp6
I input
S cache
U url
C config
E abort
L lang
Log trace
M()->...->add() insert
M()->...->save() update
getField() value/column
setField update
setInc inc()->update()
setDec dec()->update()
M()->startTrans() Db::startTrans()
M()->commit() Db::commit()
M()->rollback() Db::rollback()
M Db::table
$_GET['xx'] input('param.xx')
$_POST['xx'] input('post.xx')
$_REQUEST['xx'] input('param.xx')
$_SESSION['xx'] session('xx')
$_COOKIE['xx'] cookie('xx')
$_SERVER['xx'] input('server.xx')
$this->assign View::assign
$this->display return View::fetch

自动引入Db,View

use think\facade\Db;
use think\facade\View;
  1. 模板html文件的匹配替换

html编辑界面->右键菜单->tp3-tp6 模板替换

模板标签替换:

  • eq
  • neq
  • gt
  • egt
  • lt
  • elt
  • heq
  • nheq
  • in
  • notin
  • between
  • notbetween
  • empty
  • notempty
  • present
  • volist
  • switch
  • case
  • default
  • if
  • elseif
  • else
  • include
  • extend
  • block
  • <{
  • }>
  • {:U()}

如果有想要的功能可以给我反馈,谢谢!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft