草庐IT

test_client

全部标签

PHP 教义 : Test if an object is in an ArrayCollection

我正在尝试使用方法ArrayCollection::contains来查找对象是否已经在我的集合中,但是当我这样做时://MyArrayCollection$lesRoles=$drt->getDrtApplication()->getRoles();$leRole=$lesRoles->first();echo"PropertyappNom:".$leRole->getRleApplication()->getAppNom()."//PropertyappRole:".$leRole->getRleId()."";$role=new\Casgaya\Role(2,$drt->getD

php - Mac 上的 Valet : 502 bad gateway when running test. dev,laravel,php 安装

我在mac上用fpm在本地安装了php71。然后在去“pinganyting.dev”时让代客工作。然后进入“PHP_Apps”目录,我在其中安装了所有PHP应用程序,并在该目录中运行“代客泊车”。我在其中创建了一个包含index.php文件的“测试”目录。在浏览器中转到index.dev显示:502BadGatewaynginx/1.10.2还有日志文件记录:2017/01/3116:58:48[crit]285#0:*16connect()tounix:/Users/ME/.valet/valet.sockfailed(2:Nosuchfileordirectory)whileco

PHP7 - nusoap - nusoap_client 有一个弃用的构造函数

我想在Laravel5.3和PHP7上使用nusoap。但是当我尝试使用那个包中的composer安装它时:https://github.com/codecasts/nusoap-php7(v.0.9.6)它仍然返回我:ErrorExceptioninclass.soapclient.phpline26:MethodswiththesamenameastheirclasswillnotbeconstructorsinafutureversionofPHP;nusoap_clienthasadeprecatedconstructor我会清除缓存,但都没有成功。有没有人用PHP7在Lara

php - 没有命名空间时如何在 laravel 5.6 上使用 google-api-php-client

很抱歉,如果这是重复的,但我发现的几个关闭问题对我没有用。我是Laravel新手。我正在尝试使用github库https://github.com/google/google-api-php-client使用laravel5.6框架。我通过运行安装了api:Composer需要google/apiclient:^2.0我的composer.json看起来是正确的,因为它包括:"require":{"php":"^7.1.3","fideloper/proxy":"^4.0","google/apiclient":"^2.2","laravel/framework":"5.6.*","l

php - 为 Google Analytics PHP 安装 Google Client Library

首先我是这个话题的新手,所以我希望我的问题不会太愚蠢。我希望我的网站能够通过PHP访问GoogleAnalytics指标。我遵循了这个descriptionfromgoogle的每一步.不幸的是,当我将所有内容上传到我的服务器并尝试运行测试站点时,我总是收到以下错误消息:Fatalerror:Uncaughtexception'Exception'withmessage'Thislibrarymustbeinstalledviacomposerorbydownloadingthefullpackage.Seetheinstructionsathttps://github.com/goo

php - Yii2 类 yii\authclient\clients\GoogleOAuth 不存在

我使用dektrium/yii2-user(在一个项目上)和yiisoft/yii2-authclient(在另一个项目上)通过Google帐户登录。前段时间一切正常,但我想在上次Composer更新后发生了一些变化,现在我收到错误消息:“类yii\authclient\clients\GoogleOAuth不存在”,当我尝试打开登录页面时。有没有人有同样的问题或知道出了什么问题?谢谢 最佳答案 yii2-authclient最新版本修改,不向下兼容。Readabouttheupgradeprocesshere.两种解决方案:修改c

php - 获取用户信息 Google-PHP-Client 问题?

首先,我只想说一下我需要从用户那里获得哪些信息。全名(名字/姓氏)电子邮件地址(主要帐户,而不是@google-plus.com)位置(国家、州、城市、地址)YouTube用户名为了获得所有这些信息,我继续下载/安装位于here的PHP客户端库.由于这是我第一次使用API,我环顾四周,发现了以下范围:$client->setScopes(array('https://www.googleapis.com/auth/youtube.readonly','https://www.googleapis.com/auth/userinfo.profile','https://www.googl

php - 谷歌地图 PHP CURL 问题 "Your client has issued a malformed or illegal request. That’ s 我们都知道。”

我有一个使用CURL和GoogleMapsAPI返回地址坐标的函数。代码如下:functionget_coordinates($address_string){$address=urlencode($address_string);$url="https://maps.googleapis.com/maps/api/geocode/json?address=".$address."&key=".$api_key;$ch=curl_init();curl_setopt($ch,CURLOPT_URL,$url);curl_setopt($ch,CURLOPT_RETURNTRANSFER

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 - 这个解决方案有什么问题? (Perm-Missing-Elem codility test)

我已经开始玩codility并遇到了这个问题:Azero-indexedarrayAconsistingofNdifferentintegersisgiven.Thearraycontainsintegersintherange[1..(N+1)],whichmeansthatexactlyoneelementismissing.Yourgoalistofindthatmissingelement.Writeafunction:intsolution(intA[],intN);that,givenazero-indexedarrayA,returnsthevalueofthemissi