用Composer安装tp5验证码扩展包

到tp5项目下

d:\phpStudy\PHPTutorial\WWW\tp5>

tp5.1Composer 的代码

>composer require topthink/think-captcha=2.*

注:如果不小心安装成1.*的会出现

(thinkphp路由报错Non-static method think\Route::get() should not be called statically)之类的报错

tp5.0Composer 的代码

>composer require topthink/think-captcha=1.*

当前已经到3.X了,安装前请注意tp5的版本

如果版本错了可以用下面的语句进行移除

>composer remove topthink/think-captcha

你可能感兴趣的:(用Composer安装tp5验证码扩展包)