think-auth
think-auth copied to clipboard
你好。我的TP初学者,不会玩:composer require
composer require 5ini99/think-auth:dev-master 不会玩这个。 我应该把下载包里面的:Auth.php放到哪个文件夹下面啊? 一般第3方。我放到:vendor文件夹里面了。 现在我的结构是:vendor/auth/Auth.php 使用:use think\auth\Auth;出错了。。
这样单独放进去不起不到作用的,需要先安装composer,然后在命令行执行
composer require 5ini99/think-auth
等待成功就可以了
呵呵。我也是php新手,已经把Auth.php放到:extend/auth/Auth.php里面了。
再把:Auth.php文件里面的:
namespace think\auth;
改成:
namespace Auth;
在控制器里面调用方法是:
$auth = new \auth\Auth();
就行了。。。呵呵。。