草庐IT

assertion_failed

全部标签

php - Laravel 错误 - 未知 : Failed opening required '. ./public' (include_path ='.;C:\php\pear\' ) in Unknown on line 0

我正在使用Laravel5,我正在使用PHP函数php-Slocalhost:8888folder-name-t来显示网站。在我更新到Window10之前一切正常。现在,我尝试在我的浏览器中运行该项目,我在我的cmd中看到一个空白页面和这条消息:[MonAug0300:17:052015]PHPFatalerror:Unknown:Failedopeningrequired'public'(include_path='.;C:\php\pear\')inUnknownonline0出了什么问题? 最佳答案 听起来像是权限问题。我在W

php - 想象异常 : Postscript delegate failed imagick IIS

我正在使用这些行将pdf转换为jpg:$img=newimagick($url.'[0]');$im->setImageColorspace(255);$im->setCompressionQuality(95);$im->setImageFormat('jpeg');我已经使用softImageMagick6.7.7-102012-06-27Q16(x86)安装了imagick3.1.0RC2。我还有一个x86PHP5.4.22非线程,我在WindowsServer2012上使用IIS8。php_imagick.dll是5.14nts,所以它应该可以工作。ghostscript版本是

php - 无法使用 Composer 下载和安装 Laravel 5。错误 : HTTP request failed

我无法使用composer1.2.0(最新版本)下载lavarvel安装程序收到的错误:无法打开流:HTTP请求失败!我用谷歌搜索,但找不到解决此问题的答案。如果可能,有人请尝试运行这个命令composerglobalrequire"laravel/installer"来检查它是否有效?我认为指向packaglist的链接不再有效,但我不确定。C:\wamp\www\st>composerself-update-vvvReading./composer.jsonLoadingconfigfile./composer.jsonCheckedCAfileC:\Users\Louis\App

php - 错误的 DNS 设置,php_network_getaddresses : getaddrinfo failed Name or service not known, nslookup

问题原来是这样的:Warning:file_get_contents()[function.file-get-contents]:php_network_getaddresses:getaddrinfofailed:Nameorservicenotknownin/home///ppk_hotweb.class.phponline58我也使用了cURL,它只是返回null,仅此而已。(文件和cURL)都已启用。尝试了file_get_contents('google.com')并且成功了!为什么file_get_contents('domain.com.au')不起作用?所以我开始阅读相

php - GAE、PHP 和 GCM : failed to open stream: HTTP request failed! HTTP/1.0 405 方法不允许

我正在开发一个Web应用程序(使用适用于PHP的GAE),它会在某些内容可供下载时通知Android客户端(通过GCM-GoogleCloudMessaging)。下面的PHP脚本应该可以完成工作:$json=array('data'=>array(...),'registration_ids'=>array(...));$data=json_encode($json);$context=array('http'=>array('method'=>'post','header'=>'Authorization:key=MY_SECRET_KEY'."\r\n".'Content-Typ

phpunit 和 symfony2 : how to assert number of queries from client or response?

我正在使用symfony2和phpunit进行测试。有没有类似的东西:$client->getResponse()->getNumberOfQueries()如果不是类似的东西,从响应中检索查询数量的方法是什么?我想快速检查一下我没有优化查询的地方。编辑:我的变量$profile似乎总是null/***@dataProviderurlProvider*@param$url*/publicfunctiontestPageIsSuccessful($url){$client=self::createClient(array(),array('PHP_AUTH_USER'=>'xx','PH

php - 正则表达式练习 : reluctant quantifier with a lookahead assertion

你能解释一下这是如何工作的吗?这是一个例子:首先,我尝试使用下面的正则表达式来匹配条件注释中的内容://s它失败了,因为正则表达式匹配了第一个之前的所有内容最后一个-->.然后我尝试使用另一种带有先行断言的模式://s它的工作原理完全符合我的需要。但是,以下正则表达式也适用://s最后一个正则表达式在先行断言中没有不情愿的量词。现在我很困惑。任何人都可以向我解释它是如何工作的吗?也许这个例子有更好的解决方案?更新:我尝试在另一个文档中使用带有先行断言的正则表达式,但无法处理注释之间的内容。所以,这个//s(以及这个//s)不正确。不要使用它并尝试其他建议。更新:解决方案已被Jonny5

php - mssql_execute 失败, "stored procedure execution failed"

我目前正在使用以下查询成功连接到位于Windows2008上的SQL数据库;$result=mssql_query("EXECdbo.stored_procedure_name@param_level=2");我的查询基于用VB/ADO编写的现有代码,看起来像;Iflevel=""Thenlevel=1cmdTT.ActiveConnection=connStrTest1setobjParam=cmdTT.CreateParameter("@param_level",adInteger,adParamInput,4,level)cmdTT.Parameters.AppendobjPar

php - 导致 'Fail to open page' 的 Slim PHP 框架

我已经使用SlimPHP框架设置了一个RESTAPI,它在使用请求时完美运行,即http://mysite.com/class/id.但是当我导航到http://mysite.com/时,我在Safari中收到以下错误:Safarican’topenthepage“http://mysite.com/”.Theerroris:“cannotdecoderawdata”(NSURLErrorDomain:-1015)PleasechooseSafari>ReportBugstoApple,notetheerrornumber,anddescribewhatyoudidbeforeyous

php - 验证码 file_get_contents() : SSL operation failed

我正在为我的网页使用GooglereCaptcha。在测试模式下一切正常。无SSL。当我在生产环境中测试我的网页时,出现以下错误:Warning:file_get_contents():SSLoperationfailedwithcode1.OpenSSLErrormessages:error:14090086:SSLroutines:SSL3_GET_SERVER_CERTIFICATE:certificateverifyfailedin/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.phponline68Warni