草庐IT

call_command

全部标签

php - 错误 : "Object reference not set to an instance of an object" when calling SOAP cilent in PHP

这里是wsdl的数据这是我的尝试代码$client=newSoapClient("http://demo/demo.asmx?wsdl",array('trace'=>1,"exception"=>0));$data=array('formId'=>1,'LocationId'=>1,'FirstName'=>'test','LastName'=>'test','MobilePhone'=>11111111,'email'=>'test@test.com','AllowEmail'=>0,'Region'=>'HK','LeadSourceId'=>11,'Questions'=>ar

php - 在 PHP 7.0 中 fatal error : Uncaught Error: Call to undefined function json_encode()

我的服务器配置:[root@server~]#php-vPHP7.0.22(cli)(built:Aug7201716:18:27)(NTS)[root@server~]#nginx-vnginxversion:nginx/1.10.2操作系统:CentOS7.3.1611(核心)我的YUM安装详情:[root@server~]#yumlistinstalled|grepphpphp70u-cli.x86_647.0.22-2.ius.centos7@iusphp70u-common.x86_647.0.22-2.ius.centos7@iusphp70u-fpm.x86_647.0.

PHP5.3 : "Call to undefined method" error when calling invoke from class variable

我一直在用__invoke魔术方法做一些测试(以替换旧代码),但我不确定这是否是错误:假设我们有一个类:classCalc{function__invoke($a,$b){return$a*$b;}}以下是可能的并且没有任何问题:$c=newCalc;$k=$c;echo$k(4,5);//outputs20但是如果我想要另一个类来存储该对象的实例,这不起作用:classTest{public$k;function__construct(){$c=newCalc;$this->k=$c;//Justtoshowasimilarsituationthanbefore//$this-k=n

PHP fatal error : Call to undefined function when function is defined

我在PHP中遇到错误:PHPFatalerror:CalltoundefinedfunctiongetCookie代码:include('Core/dAmnPHP.php');$tokenarray=getCookie($username,$password);在dAmnPHP.php中,它在类dAmnPHP中包含一个名为getCookie的函数。当我运行我的脚本时,它告诉我该函数未定义。我做错了什么? 最佳答案 看起来您需要先创建该类的一个新实例,然后才能使用它的功能。尝试:$dAmn=newdAmnPHP;$dAmn->getC

php - 为什么我收到错误 "Commands out of sync; you can' t 现在运行此命令”

标题中提到的错误的文档说IfyougetCommandsoutofsync;youcan'trunthiscommandnowinyourclientcode,youarecallingclientfunctionsinthewrongorder.Thiscanhappen,forexample,ifyouareusingmysql_use_result()andtrytoexecuteanewquerybeforeyouhavecalledmysql_free_result().Itcanalsohappenifyoutrytoexecutetwoqueriesthatreturnd

PHP fatal error : Call to a member function find() on a non-object however my function work

我在代码的第71行收到此错误,但是该行的功能已正确执行,并且按照我的预期执行。但是,我注意到我的错误日志中充满了这些行:[09-Dec-201314:54:02UTC]PHPFatalerror:Calltoamemberfunctionfind()onanon-objectin/home/sportve/public_html/open_event_common.phponline71我检查的内容:simple_html_dom_parser已包含在内,第71行打算执行的此功能正在运行。这是我的代码的第71行:$content->find('a.openevent',0)->inne

php - 第 2 行的 fatal error : Call to undefined function mysql_connect() in C:\Apache\htdocs\test. php

fatalerror:在第2行调用C:\Apache\htdocs\test.php中未定义的函数mysql_connect()我今天花了11个小时试图解决这个问题。我已经安装:MySQL5.1Apache2.2.14PHP5.2.17这些是“PHP和MySQL”一书中提到的版本。当我运行脚本时:其中localhost、root和密码是此给定测试的真实值系统,我所看到的是:fatalerror:在第2行调用C:\Apache\htdocs\test.php中未定义的函数mysql_connect() 最佳答案 取消注释“php.in

PHP fatal error : Call to undefined function session_register()

这个问题在这里已经有了答案:Fatalerror:Calltoundefinedfunctionsession_register()(3个答案)关闭3年前。我已经将我的站点从php5.3移动到5.4,现在我无法登录站点管理我看到这个错误:PHPfatalerror:调用/home/regimhot/public_html/webmotionsV4/mvc/models/kit_model_useri.php中的未定义函数session_register()第18行有问题的代码是:functionlogin($username,$password){if(!$username||!$pa

php - fatal error : Uncaught Error: Call to undefined function ereg_replace() PHP 7

这个问题在这里已经有了答案:HowcanIconverteregexpressionstopreginPHP?(4个答案)关闭3年前。下面的代码给我php7中的fatalerror$jquery_click_hook=ereg_replace("[^A-Za-z0-9]","",strtolower($value['name']));有什么方法可以让它与php7兼容吗?

Php artisan 制作:auth command is not defined

我正在尝试在Laravel5.2中运行此命令,但它不起作用:phpartisanmake:auth并提示这些语句:[InvalidArgumentException]Command"make:auth"isnotdefinedDidyoumeanoneofthese?make:testmake:requestmake:migrationmake:seedermake:middlewaremake:controllermake:providermake:policymake:eventmake:consolemake:jobmake:listenermake:modelmake:comm