草庐IT

ERROR_INVALID_TOKEN

全部标签

php - 用于匹配 URL 中的 JSON Web token 的正则表达式

我需要一些帮助来改进这个正则表达式,以便能够使用PHP识别URL字符串中的JWTtoken。这可以很好地匹配token,但如果我附加另一个URI段则不会。到目前为止的正则表达式:/[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)$/适用于以下网址:http://not.website.com/**eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2

php - fatal error : Call to a member function getAttributes() on array

我一直在做这个google身份验证教程,以更好地了解如何使用googlesigninapi,但我最近收到了这个错误:Fatalerror:CalltoamemberfunctiongetAttributes()onarray.每当我尝试:$this->client->verifyIdToken()->getAttributes();在getPayload()函数中。我不知道为什么会这样。我的配置是Windows10,我正在使用WAMP服务器来运行这个应用程序。任何帮助将不胜感激。client=$googleClient;$this->client->setClientId('234sf

php - Google oauth2 访问 token 将在 1 小时后过期。我想做 1 天

我已经使用GoogleOAuth2凭据创建了一个用于Google日历的项目。但是,访问token每1小时过期一次。谁能帮我把过期时间改成1天。我已使用此代码访问谷歌日历事件:$client=newGoogle_Client();$client->setApplicationName("Client_Library_Examples");$client->setClientId($client_id);$client->setClientSecret($client_secret);$client->setRedirectUri($redirect_uri);$client->setAc

php - Ajax 错误 : Unexpected token < in JSON at position 0 on WordPress Contact Form 7 submit

我在发布联系表单时遇到了一个奇怪的问题。加载图标一直在加载,表单没有提交。电子邮件已发送,我的before_send_mail函数也有效。奇怪的是,当我取消对before_send_mail函数的注释时,它没有显示任何错误。所以它可能来self的代码。但是首页没有改变状态,一直显示加载图标。错误信息是这样的:Unexpectedtoken<inJSONatposition0你们能帮帮我吗?下面是before_send函数。add_action('wpcf7_before_send_mail','form_to_crm');functionform_to_crm($cf7){$wp

javascript - 刷新 AjaxPOST 数据表上的 CSRF token : CodeIgniter

我正在尝试让数据表在我的网站上运行。但是当我单击搜索、下一页、排序时,它不起作用。这是因为未重新生成CSRFtoken。这是我的代码:HTMLNoFirstNameLastNamePhoneAddressCityCountryNoFirstNameLastNamePhoneAddressCityCountryJSvartable;$(document).ready(function(){//datatablestable=$('#test-table').DataTable({"processing":true,//Featurecontroltheprocessingindicato

PHP fatal error 允许内存大小耗尽

我正在编写一个codeigniter应用程序,在执行查询时遇到以下fatalerror。Fatalerror:Allowedmemorysizeof134217728bytesexhausted(triedtoallocate262144bytes)in/var/www/html/cryd/_zcore/core/Loader.phponline262我可以增加允许的内存大小,但问题似乎更严重,如果是内存泄漏,我只会给php更多内存来玩。查询甚至没有那么密集,它只返回一行数据。这是我的Controllerlang->language);$this->parser->parse('das

PhpUnit 弃用通知 : error guessing kernel directory

这是我的PhpUnit测试类:但是当我尝试运行它时,我得到的错误是:UnabletoguesstheKerneldirectory.C:\myProject\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Test\KernelTestCase.php:62C:\myProject\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Test\KernelTestCase.php:138C:\myProject\vendor\symfony\symfony

php - fatal error : Using $this when not in object context - OOPHP

我只是想通过构造函数设置post_id并通过另一个函数获取该id。但它正在返回:fatalerror:不在对象上下文中时使用$this但不知道为什么会这样正在发生。我以前做过很多次,但现在出了问题。代码如下classPostData{privatestatic$instance=null;public$post_id=0;publicfunction__construct($post_id=0){if((int)$post_id>0){$this->setId($post_id);}}privatefunctionsetId($post_id){return$this->post_id

php - 本地 WordPress 站点上的 cURL 返回 : Error 6 (Could not resolve host)

我有一个本地WordPress安装运行在:https://catalogue3.test.请注意,所有.test域都应解析为localhost,因为我使用Laravelvalet.但是,当我在我的Laravel项目中执行以下代码时,出现如下所示的异常。$client=new\GuzzleHttp\Client();$response=$client->request('GET',"https://catalogue3.test",['verify'=>false]);ConnectExceptioncURLerror6:Couldnotresolve:catalogue3.test(D

php - 如何修复 "Recoverable fatal error: Object of class Closure could not be converted to string in..."

当我执行这段代码时出现这个错误。我不知道该怎么办。请帮忙ResultadosparalabúsquedaNúmeroderesultadostotal: 最佳答案 你的问题出在这里$numRows=(function()use($total){if($total你必须在括号之间包装函数,如果你想传递参数,你应该使用use() 关于php-如何修复"Recoverablefatalerror:ObjectofclassClosurecouldnotbeconvertedtostringin