草庐IT

google_play_services_version

全部标签

php - 使用 PHP 和 Drive API 将文件上传到 Google Drive 上的特定文件夹

希望这是一个简单的...我想将文件直接上传到文件夹中。我得到了文件夹ID,并且我有这段代码可以完美地在根目录中上传文件:';$client=newGoogle_Client();$client->setClientId('');$client->setClientSecret('');$client->setRedirectUri('');$client->setScopes(array(''));$client->setAccessToken($access);$client->setAccessType('offline');$client->refreshToken($refre

php - Google api refresh_token null 以及如何刷新访问 token

我将HWIOBundle用于googleapi,当我收到来自googlerefreshToken=null的响应时,为什么?如何刷新tokenoAuthToken={HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken}[11]accessToken="ya29.Ci8lA1JTu9CB81dOFy-nzszViRgCI2CvvKVrCd0Lq-8I0QR_dIrl-_7RccdGt1Islg"rawToken={array}[4]access_token="ya29.Ci8lA1JTu9CB81dOF

php - 发生客户端错误 : Could not create storage directory:/tmp/Google_Client/00

此错误对YoutubeAPIv3.0意味着什么:Aclienterroroccurred:Couldnotcreatestoragedirectory:/tmp/Google_Client/00我在Google的文档中使用PHPYoutubeAPI找到here. 最佳答案 我在不更改GoogleAPI的任何行的情况下解决了这个问题。在您的PHP代码中,您只需要指定缓存文件夹所在的位置:$config=newGoogle_Config();$config->setClassConfig('Google_Cache_File',arra

php - 使用适用于 PHP 的 Google+ API——需要获取用户电子邮件

我正在使用GooglePHPAPI。该文档相当乏味...我想让用户连接他们的Google+信息,并使用它在我的数据库中注册用户。为此,我需要获取他们用于谷歌帐户的电子邮件。我似乎不知道该怎么做。通过在用户连接到我的应用程序时强制许可,在Facebook中很容易。有人知道吗?这是我用来获取用户google+个人资料的代码,它工作正常,但用户可能没有在此处列出他们的电子邮件。include_once("$DOCUMENT_ROOT/../qwiku_src/php/google/initialize.php");$plus=newapiPlusService($client);if(iss

php - Symfony 2.5 "You have requested a non-existent service "siteTest.b"

当运行workspace/app_dev.php时,没问题。但是当我尝试运行workspace/app.php时,我得到:"Youhaverequestedanon-existentservice"siteTest.b"我不知道我做错了什么。应用程序/配置/config.yml:imports:-{resource:parameters.yml}-{resource:security.yml}framework:secret:"%secret%"router:resource:"%kernel.root_dir%/config/routing.yml"strict_requiremen

php - Symfony2 : "Fatal error: Class service..." while trying to include a class as an service in config. yml (TCPPDF)

我正在尝试在Symfony2(2.1.4-DEV)中使用服务容器包含类TCPDF的扩展。为此,我编辑了symfony/app/config/config.yml:services:extend_pdf:class:Acme\VSBundle\extend_pdf在文件symfony/src/Acme/VSBundle/extend_pdf.php中,我有一个像这样的虚拟类:我将其加载到Controller中,例如:functiontestAction(){$extendpdf=$this->get('extend_pdf');returnnewResponse('success');}

amazon-web-services - 带有 Nginx 和 PHP-FPM 的 AWS EC2 - 不能将 CPU 推到 50% 以上

我正在尝试测试AWSAutoScaling,为此我需要将一个EC2实例推送到触发器(比如CPU使用率超过80%几分钟)会导致另一个实例启动的点。我发现的问题是无法使CPU使用率超过50%。我使用的是Nginx,我已将worker_connections的数量从1024调整到更大的数量。我将worker_processes设置为自动。另外fastcgi_params设置如下:fastcgi_connect_timeout60;fastcgi_send_timeout180;fastcgi_read_timeout180;fastcgi_buffer_size128k;fastcgi_bu

php - 拉维尔 : Overriding a Bundle's Service Providers

我有一个项目使用Laravel的Sentinel包。前一段时间,我问了一个关于extendingamodelprovidedinthebundle的问题.我接受的答案有效,但它需要在供应商文件夹中编辑bundle的代码。从那时起,我运行了一个composerupdate命令,我应用的更改被覆盖了(这并不奇怪)。我现在对laravel的工作原理有了更多的了解,所以我能够追溯到我的应用程序引用bundle服务的终点。在我的config/app.php文件中,我有服务提供商引用:'Sentinel\SentinelServiceProvider',SentinelServiceProvide

PHP Google Sheets API 快速启动问题

我正在尝试使用Google表格API。我完全按照此URL中的说明进行操作:https://developers.google.com/sheets/quickstart/php当然,我在这里发帖的原因是我遇到了一个令人困惑的错误:)我正在采取的步骤是安装Composer:curl-shttps://getcomposer.org/installer|php然后我收到一条成功消息。然后我运行:phpcomposer.pharrequiregoogle/apiclient:1.*就像从google请求的那样,然后我返回。phpcomposer.pharrequiregoogle/apicl

php - 故障转移如何在 Google Cloud SQL 上运行?

我打算将一个PHP应用程序(从GoogelCloudPlatform外部的服务器)连接到GoogleCloudSQL。我想知道如何设计应用程序以正确地故障转移其数据库。根据manual:Whenazonaloutageoccursandyourmasterfailsovertoyourfailoverreplica,anyexistingconnectionstotheinstanceareclosed.However,yourapplicationcanreconnectusingthesameconnectionstringorIPaddress;youdonotneedtoupd