首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google Authenticator与PHP不起作用

Google Authenticator与PHP不起作用
EN

Stack Overflow用户
提问于 2021-01-20 03:52:37
回答 2查看 294关注 0票数 0

我正在尝试使用我第一次安装该项目的项目https://github.com/sonata-project/GoogleAuthenticator:composer require sonata- project /google-authenticator。在此之后,当我想要查看操作时,我收到一个错误

PHP致命错误:在第19行的/home/#/vendor/sonata-project/google-authenticator/src/GoogleAuthenticator.php中找不到接口'Sonata\GoogleAuthenticator\GoogleAuthenticatorInterface‘

我是不是忘了什么?

任何帮助都将不胜感激!

EN

回答 2

Stack Overflow用户

发布于 2021-07-21 15:28:25

我猜你已经解决了这个问题,或者以某种方式绕过了它。但对我来说答案正在改变

代码语言:javascript
复制
include_once __DIR__.'/src/FixedBitNotation.php';
include_once __DIR__.'/src/GoogleAuthenticator.php';
include_once __DIR__.'/src/GoogleQrUrl.php';
代码语言:javascript
复制
include_once __DIR__.'/src/FixedBitNotation.php';
include_once __DIR__.'/src/GoogleAuthenticatorInterface.php';
include_once __DIR__.'/src/GoogleAuthenticator.php';
include_once __DIR__.'/src/GoogleQrUrl.php';

也就是说,添加: include_once __DIR__.'/src/GoogleAuthenticatorInterface.php';

票数 1
EN

Stack Overflow用户

发布于 2021-08-23 06:16:30

将以下行添加到位于src文件夹中的GoogleAuthenticator.php文件中

代码语言:javascript
复制
include_once 'GoogleAuthenticatorInterface.php';
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65798537

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档