草庐IT

hks_client_service_adapter

全部标签

php - Google 云端硬盘服务帐户和 "Unauthorized client or scope in request"

我有3个使用DriveSDK的服务帐户。1,有效,2无效。返回的错误是“ErrorrefreshingtheOAuth2token,message:'{"error":"unauthorized_client","error_description":"Unauthorizedclientorscopeinrequest."}'"所有3个帐户都已在开发者控制台中注册。所有3个都被授权在GoogleApps控制台中进行“ManagedClientAPIaccess”。所有3个都有范围“https://www.googleapis.com/auth/drive.readonly”。所有3个

php - haxe (php) https 调用 : stream_socket_client() Peer certificate CN did not match expected CN

我正在使用haxe的Http类(编译为php)通过https将request()发送到AWS。这是一个使用haxe-aws库(https://github.com/Blank101/haxe-aws)的最小示例:variamconf=newIAMConfig('newbucket.s3-eu-central-1.amazonaws.com',accessKey,secretKey,'eu-central-1','s3');varsig4=newSig4Http('https://newbucket.s3-eu-central-1.amazonaws.com/',iamconf);sig

php - Oauth 2 $client->getAccessToken() 返回空值

我正在使用codeigniterMVC框架使用谷歌客户端库登录我的网站。当谷歌使用代码重定向并且我执行以下代码时,一切都运行良好,期待$client->getAccessToken()。$client->getAccessToken()返回空值。我看了很多教程,但没有得到任何帮助。这是我的Controller功能一的代码。在此函数中,我设置我的凭据以创建authUrl。publicfunctionlogin(){//Includetwofilesfromgoogle-php-clientlibraryincontrollerinclude_onceAPPPATH.'third_part

php - [Microsoft][SQL Server Native Client 11.0]共享内存提供程序 : Timeout error [258]

美好的一天。我在php5上有网站。所有查询均使用sqlsrv执行;当我进行查询时出现错误:[Microsoft][SQLServerNativeClient11.0]SharedMemoryProvider:Timeouterror[258]如何修复错误? 最佳答案 此错误可能是由于连接速度非常慢或SQL查询耗时过长造成的。这不是SQLServer的问题。尝试在PHP的connectionString中扩展超时值。SeethispreviousanswerYouneedtochangesomesettinginyourphp.ini

PHP $client->__soapCall ('method' , $params);对比。 $客户端->方法($参数);

我正在用PHP创建一个SOAP客户端。我的大部分电话都是这样的$client->__soapCall('method',$params)据我所知,这是在WSDL中调用方法的两种方法之一,另一种是:$client->method($params);在调用只需要字符串的方法时,我只能使用第二种方法。使用需要整数的方法会给我这个错误:Thevalue''cannotbeparsedasthetype'Int32'.'这两个请求的工作方式有何不同? 最佳答案 直接调用($client->method())使用已弃用的魔法类方法__call(

php - OO : Inheritance vs Service

关闭。这个问题是opinion-based.它目前不接受答案。想改善这个问题吗?更新问题,以便可以通过editingthispost用事实和引文回答问题.6年前关闭。ImprovethisquestionClassA{publicfunction__construct(Foo$foo,Bar$bar,MyCustomType1$mct){//...}//...publicfunctiongetFooBarFunction(){$this->foo->aMethod();$this->bar->anotherMethod();//someotherexecutionhere}}Class

php - 使用 PHP Google_Client、Google_Service_Blogger 通过 API v3 列出 Blogger 帖子

我正在使用GooglePHP客户端库来访问GoogleAPI(参见reference)我正在尝试从私有(private)博客中获取帖子列表(与RSS提要中的内容相同)。私有(private)博主博客显然没有开放的RSS提要,所以这是我对两者的尝试以编程方式检索博客内容满足博客的隐私限制。API客户端中使用的token是博客的授权读者。这是代码。这一切都很好(连接、检索正确的博客对象等),但在尝试使用getItems函数本身获取发布数据时失败(参见librarysource,第2007行)。返回一个空数组。$client=newGoogle_Client();$client->setCl

php - 为什么我会收到此错误 : Class "Google_Service_Calendar" not found?

这是我的代码:这只是来自GoogleDevelopers的示例Quickstart.php:require__DIR__.'/vendor/autoload.php';define('APPLICATION_NAME','GoogleCalendarAPIPHPQuickstart');define('CREDENTIALS_PATH','~/.credentials/calendar-php-quickstart.json');define('CLIENT_SECRET_PATH',__DIR__.'/client_secret.json');define('SCOPES',impl

php - 当我尝试以编程方式将图表添加到 google 电子表格时,api v4 失败并出现关于网格 id 的 Google_Service_Exception

我试用了googlesheetsapiv4,因为它还具有呈现图表的能力,看起来非常有趣。我正在使用适用于php的googleapi客户端。首先,我创建了一个包含两张纸的新电子表格,并在第一张纸上填写了数据。这按预期工作。然后我想根据第一张纸上的数据在第二张纸上渲染图表。我想从饼图开始,因为你只有一个数据系列。我总是以以下错误消息结束:"message":"Invalidrequests[0].addChart:Nogridwithid:1"我设置的唯一id是我已经创建的第二张工作表的图表anchor单元格:$googleSheetsSheetGridCoordinate=newGoog

php - 如何使用 Zend_Db_Adapter 在每次调用 "query"时运行多个 SQL 查询?

这是我编写的一个Zend_Application_Resource,用于在部署中进行更改时自动更新模式。getOptions();$version=(int)$options['version'];return$version;}/***Returnstheversionthedatabasethinksitis.**@returnint*/privatefunctionGetDbVersion(){$adapter=Zend_Db_Table::getDefaultAdapter();$metadataTable=newCas_Model_Table_Metadata;$verQue