草庐IT

Forth_Parameter

全部标签

PHP 每晚 : Parameter must be an array or an object that implements Countable

我看到了UTfailures在aPHPwebapp每晚在TravisCI中针对PHP运行:$php--versionPHP7.2.0-dev(cli)(built:Dec4201622:49:34)(ZTS)这是失败的测试用例:$payments=PaymentsHelper::refunds('DE0000000001','2016-04-01','2017-04-01');$this->assertNotNull($payments);$this->assertEquals(0,count($payments));测试失败1)PaymentsHelperTest::test_ref

php - 交响乐 : sfDoctrineRoute pass additional Parameter

我正在使用symfony1.4,我的/-Route有以下路线:homepage:url:/class:sfDoctrineRouteoptions:{model:ContentPage,type:object}param:{module:page,action:show}我的show-Action看起来像这样:classpageActionsextendssfActions{publicfunctionexecuteShow(sfWebRequest$request){$this->content_page=$this->getRoute()->getObject();$this->f

php - 警告 : fread(): Length parameter must be greater than 0

我想用我自己的代码创建一个有许可证的系统,但是给我一个错误代码是这样的,在lic.txt中也是一样的1234567,有什么问题吗?这是错误,如果我把@放在freaddosent前面显示错误但不打开文件Warning:fread():Lengthparametermustbegreaterthan0in/home/u422978792/public_html/platforma/license/index.phponline7Invalidlicensekey 最佳答案 在使用fread之前,您需要检查文件大小if(filesize(

php - 错误 "(get) unknown parameter: ' personFields'"遵循 Google People API 文档中的示例时

我正在尝试使用GooglePeopleAPI添加和更新我的Google联系人。我已经使用Google文档(https://developers.google.com/people/v1/getting-started)中给出的示例代码几乎逐字设置了API。我收到以下代码行的错误,它再次逐字来自文档:$profile=$people_service->people->get('people/me',array('personFields'=>'names,emailAddresses'));错误如下:Fatalerror:Uncaughtexception'Google_Exceptio

php - Symfony2 "Parameter ""for route ""must match "[^/]++"(""given) to generate a corresponding URL."

我有这个路线文件:indexRechercheZones:path:/gestionzonestechniquesdefaults:{_controller:MySpaceGestionEquipementsTechniquesBundle:GestionZonesTechniques:indexZonesTechnique}requirements:methods: GETmodifierZones:path:/gestionzonestechniques/modifier/{nom}defaults:{_controller:MySpaceGestionEquipementsTec

php - PDOException : SQLSTATE[IMSSP]: Tried to bind parameter number 65536. SQL Server 最多支持2100个参数

好吧,我遇到了一个非常奇怪的PDOException,我似乎无法理解。这是生成的异常:PDOException:SQLSTATE[IMSSP]:Triedtobindparameternumber65536.SQLServersupportsamaximumof2100parameters.inD:\Work\CEUR16-004\Project\www_root\includes\scripts\php\libCore\products.php:169Stacktrace:#0D:\Work\CEUR16-004\Project\www_root\includes\scripts\p

php - 给出警告 : mysqli_free_result() expects parameter 1 to be mysqli_result, bool 值

这个问题在这里已经有了答案:Whattodowithmysqliproblems?Errorslikemysqli_fetch_array():Argument#1mustbeoftypemysqli_resultandsuch(1个回答)INSERTqueryproduces"Warning:mysqli_num_rows()expectsparameter1tobemysqli_result,booleangiven"(3个答案)关闭2年前。为什么我会收到此错误消息:Warning:mysqli_free_result()expectsparameter1tobemysqli_re

php - 谷歌 API OAuth 2.0 CURL 返回 "Required parameter is missing: grant_type"

我正在尝试为Web服务器应用程序实现Google的OAuth2.0身份验证。我可以从Google获取代码,但是当我发回此代码以尝试获取访问token时,它总是给我错误“缺少必需的参数:grant_type。错误400”,即使grant_type存在。此外,如果我将内容长度指定为0以外的任何值,它会引发其他错误。这是执行此curl帖子的代码:$url='https://accounts.google.com/o/oauth2/token';$ch=curl_init($url);curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);curl_setop

PHP 警告 : mysqli_close() expects parameter 1 to be mysqli

我正在尝试通过php连接到sql数据库,但一直收到我无法弄清楚的错误。我可以毫无错误地连接到另一个调试脚本。我获得连接并提取数据,但最后出现错误。$con=mysqli_connect("localhost","username","password","dbname");//Checkconnectionif(mysqli_connect_errno()){echo"FailedtoconnecttoMySQL:".mysqli_connect_error();}//ThisSQLstatementselectsALLfromthetable'Locations'$sql="SELE

php - API cURL 调用错误 : {"errors": {"price_rule" :"Required parameter missing or invalid"}}

我在cURL调用基于所选产品的价格规则时遇到错误。以下是我的错误:{"errors":{"price_rule":"Requiredparametermissingorinvalid"}}以下是我在cURL调用中发送的主体参数:{"price_rule":{"title":"sss","target_type":"line_item","target_selection":"entitled","allocation_method":"across","value_type":"fixed_amount","value":"-434","customer_selection":"all