草庐IT

client-additional-parameters-usin

全部标签

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

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

php - Facebook 错误 "Missing redirect_uri parameter."

Kohana_Exception[0]:Errorfetchingremotehttps://graph.facebook.com/oauth/access_token?client_id=&client_secret=&code=&redirect_uri=http%3A%2F%2F%2Flogin%3Fmethod%3Dfboauth%26redirect_uri%3Dhttp%253A%252F%252F%252F[status400]{"error":{"type":"OAuthException","message":"Missingredirect_uriparameter

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 - 警告 : Missing argument 1 when passing parameters from url to controller (laravel)

我正在构建这个网站,我想将url参数传递给路由以及从路由传递给Controller​​,我已经搜索了文档和谷歌,但找不到解决我的问题的方法这是一个示例urllocations/search?q=parameter1我现在的路线是这样的:Route::group(array('prefix'=>'search'),function(){Route::get('locations/{src?}','SearchController@locations',function($src=null){});});我的Controller看起来像这样:classSearchControllerext

php - "Wrong parameters for Exception"创建Exception子类时

这是我的代码classMyExceptionextendsException{publicfunction__construct($message,$code=0,Exception$previous=null){parent::__construct($message,$code,$previous);}publicfunction__toString(){return__CLASS__.":[{$this->code}]:{$this->message}\n";}}这里是错误Fatalerror:WrongparametersforException([string$excepti

php, invokeArgs : parameters changed, 怎么返回呢?

首先,我要测试一个功能:privatefunctiontestMe(array&$output){$output['a']=3;//$$$$$outputgetschanges}我做了一个小方法让它公开,然后调用:publicstaticfunctionmakePublicAndCall($objectInstance,$methodname){$ref=newReflectionMethod(get_class($objectInstance),$methodname);$ref->setAccessible(true);$params=array();for($i=2+1;$iin

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 流 : difference between options and parameters

PHPstreams中的两个关键概念特征是contextoptionsandparameters.«选项»和«参数»有什么区别?Documentationabouttheformer相当简单。似乎选项是一个特定于协议(protocol)的设置,例如如果您使用HTTP或MongoDB中的“插入文档时调用的回调函数”,则为“方法”(get、post、put...)。那什么是参数?stream_context_set_params()manualpage包含对“通知”和“选项”(选项??)的支持参数的稀疏引用。Contextparameters页面只提到“通知”,好像他们在PHP/4.3.0

php - Nelmio Api 文档包 : Documentating required Parameters

我目前正在使用NelmioApiDocBundle,对此我还不是很熟悉。我正在编写的API必须提供更改特定用户密码的路径。文档应该说明,要更改密码,旧密码和新密码都是必需的。由于我没有找到关于Requirements和Parameters之间区别的解释,我猜前者用于路由数据,后者用于API调用本身.归档此类文档的第一个尝试是实现一个简单的模型,然后JMSSerializerBundle会自动转换该模型:classChangePasswordParam{/***@Type("string")*@varstring*/protected$oldPassword;/***@Type("str