草庐IT

illegal_argument_exception

全部标签

php - 未捕获的异常 'Exception' 消息为“DateTime::__construct():

我在输出在我的PHP文件中创建的日期时遇到问题。我一直在关注如何制作一个真正的Basic-CMS平台的教程,以帮助我了解databases和PHP的一些基础知识,一切都已经完成一切顺利,直到我尝试输出页面的创建日期。这是我得到的错误Fatalerror:Uncaughtexception'Exception'withmessage'DateTime::__construct():Itisnotsafetorelyonthesystem'stimezonesettings.Youare*required*tousethedate.timezonesettingorthedate_defa

php - 为什么 Exception 不是 Throwable 的实例?

我认为在所有编程语言中,Exception类都是Throwable接口(interface)的实例。看看下面的代码,它显示Exception不是php中Throwable的实例。try{thrownewInvalidArgumentException("errormessage");}catch(InvalidArgumentException$e){if($einstanceofException){echo'$eisexception';//thislinegetsexecuted}if($einstanceofThrowable){echo'$eisthrowable';//bu

PHP 和 FPDI/FPDF : Fatal error: Uncaught Exception: FPDF error: Incorrect output destination

我有一个PDF文件,我想用FDI/FPDF添加一个新页面Fatalerror:UncaughtException:FPDFerror:Incorrectoutputdestination:outfiles/111111.pdfinC:\wamp\www\pdf\fpdi\fpdf.phponline271(!)Exception:FPDFerror:Incorrectoutputdestination:outfiles/111111.pdfinC:\wamp\www\pdf\fpdi\fpdf.phponline271require_once('fpdi/fpdf.php');requ

php - php有没有类似javascript的arguments变量的东西

这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:PHPgetallargumentsasarray?在javascript函数中,参数总是指向包含函数参数的类似数组的对象。php是否有类似的东西,所以我可以轻松地var_dump()所有函数的参数?

PHP Javascript 未捕获语法错误 : Unexpected token ILLEGAL

我有这个PHP脚本,但它不能正常工作。错误是什么?$(document).ready(function(){$('div.aler').css('display','block');$("div.aler").html("'.$success.'';}elseif($failure){echo''.$failure.'';};?>");setTimeout(function(){$("div.aler").fadeOut("slow",function(){$("div.aler").remove();});},5000);});我认为引号一定有问题:".$failure有消息,但Ja

php - Eloquent fatal error : argument passed not the right instance

我正在使用Slim和Eloquent在PHP中构建端点系统,如概述here.在我的本地开发人员中运行它时,下面的代码失败并出现基于方法预期的fatalerror//LoadEloquent$connFactory=new\Illuminate\Database\Connectors\ConnectionFactory();$conn=$connFactory->make($settings);$resolver=new\Illuminate\Database\ConnectionResolver();$resolver->addConnection('default',$conn);$

php - 更新到 PHP 7 后出现 CodeIgniter CI_Exceptions::show_exception 错误

我在PHP5.6中使用CodeIgniter3.0.0。昨天我更新到PHP7并开始出现以下错误:-UncaughtTypeError:Argument1passedtoCI_Exceptions::show_exception()mustbeaninstanceofException,instanceofErrorgiven,calledin/my/file/path/app/system/core/Common.phponline658anddefinedin/my/file/path/hgx_portal/app/system/core/Exceptions.php:190Stac

php - fatal error : Uncaught exception 'Exception' in PHPExcel classes

谁能告诉我,为什么从PHPExcel类中抛出以下错误Fatalerror:Uncaughtexception'Exception'withmessage'Couldnotclosezipfile/var/www/mydomain/myexcel.xlsx.'in/var/www/mydomain/Classes/PHPExcel/Writer/Excel2007.php:400Stacktrace:#0/var/www/mydomain/myexcel.php(173):PHPExcel_Writer_Excel2007->save('/var/www/mydomain...')#1{

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 - Kohana_Exception [ 0 ]:需要有效的 cookie 盐。请设置 Cookie::$salt

我正在学习本教程(http://kowsercse.com/2011/09/04/kohana-tutorial-beginners/)并遇到此错误消息:Kohana_Exception[0]:Avalidcookiesaltisrequired.PleasesetCookie::$salt.我是一个n00b,甚至不知道在应用程序中的哪里寻找Cookie::$salt。 最佳答案 您必须提供盐,您可以在officialdocumentation中看到//bootstrap.phpCookie::$salt='foobar';我强烈推