草庐IT

error500

全部标签

php - fatal error : Switch statements may only contain one default clause in mpdf. PHP

我正在使用mPDF,它在本地主机上运行良好。我将项目上传到实时服务器,但它没有正确生成pdf。WriteHTML($body);$mpdf->Output('SaveToPDF.pdf','D');在顶部,我放置了错误显示代码。要查看错误发生了什么问题,我有以下错误。Fatalerror:Switchstatementsmayonlycontainonedefaultclausein/customers/d/e/a/....URL..GO..HERE/mpdf.phponline1432我在我的本地主机上使用PHP版本5.6.31,在现场我使用的是one.com,在那里我可以切换到不同

php - 第 6 行的 fatal error : Call to a member function get() on a non-object in C:\wamp\www\ci\application\models\site_model. php

你好,我刚看了Nettuts上的第一个/第1天截屏视频“来自scracth的CodeIgniter”,我已经遇到了一个我不明白的错误。这是屏幕截图http://i39.tinypic.com/14mtc0n.jpg我的models\site_model.php中的代码和截屏是一样的models\site_model.phpclassSite_modelextendsCI_Model{functiongetAll(){$q=$this->db->get('test');if($q->num_rows()>0){foreach($q->result()as$row){$data[]=$ro

php - 压缩文件并将 AddOutputFilterByType 与 .htaccess 一起使用时出现 500 错误

我在WindowsVista上使用Apache2.4和PHP5.5并尝试压缩文件。这是我的.htaccessRewriteEngineon#ifadirectoryorafileexists,useitdirectlyRewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule^(.*)?$index.php/$1[L]#compresstext,html,javascript,css,xml:AddOutputFilterByTypeDEFLATEtext/plainAddOutputFil

php - Symfony3 : Fatal error: Class 'AppKernel' not found in .\bin\控制台

刚开始处理一个项目,我运行了composerupdate并在尝试清除缓存时遇到异常。当我尝试运行phpbin\consoleserver:run时,我收到了这条消息:phpbin\consoleserver:runPHPFatalerror:UncaughtSymfony\Component\Debug\Exception\FatalThrowableError:Fatalerror:Class'AppKernel'notfoundinCoreBundle\bin\console:27Stacktrace:#0{main}throwninCoreBundle\bin\consoleon

php - fatal error : Call to undefined function add_action()

我有一些推特更新的代码-functiontwitit(){global$wp_query;$thePostName=$wp_query->post->post_name;echo'ID).'"title="ClicktosendthispagetoTwitter!"target="_blank">ShareonTwitter';}functionwidget_twitit($args){extract($args);echo$before_widget;echo$before_title;echo$after_title;twitit();echo$after_widget;}func

php - 你能告诉 PHP 在发生错误时发送 header (如 500)吗?

在我当前的项目中,我使用普通HTTP请求查询PHP,但也通过AJAX查询,有时我返回JSON格式的数据,有时返回普通文本。当发生错误时,在正常请求中,您会看到错误消息并可以采取一些措施。另一方面,对于AJAX请求,您无法确定是否收到错误或您想要的数据,因为它没有直接显示——您只会遇到麻烦,因为您的应用程序将无法再工作。所以我想到了一个错误处理系统。我最好的想法是在发生错误时发送500“InternalServerError”header,因此在我的JS中,当我发送AJAX请求时,我可以简单地检查错误并处理它。不幸的是,PHP本身不会发送这种header(比如当您遇到解析错误或代码中出现

php - fatal error .. 调用成员函数.. 在非对象上

我有一个包含send_notification函数的GCM类。在另一个类Demand.php中,我尝试使用send_notification函数。所以我在Demand.php中有一个构造函数,它指向我的GCM类,如下所示:$gcm=newGCM();这个$gcm变量在该类内部的函数中使用,如下所示:$result=$gcm->send_notification($registatoin_ids,$message);这就是我得到错误的地方:nFatalerror:Calltoamemberfunctionsend_notification()onanon-objectin..我搜索了问题

PHP 可捕获 fatal error : Object of class could not be converted to string

我完全迷失在这里......在验证一些输入后,我创建了一个Message类的实例并尝试将数据插入数据库://sendmessage$message=$this->model->build('message',true);$message->insertMessage($uid,$user->user_id,$title,$message);插入的方法非常简单://insertanewmessagepublicfunctioninsertMessage($to_id,$from_id,$title,$body){$sql="INSERTINTOmessages(to_id,from_id

php - fatal error : Class 'PHPUnit_Framework_TestCase' not found

我正在使用XAMPP1.8.1、Windows764位、NetbeansIDE7.4我已经安装了PHPUnit。当我运行代码时,出现以下错误。Fatalerror:Class'PHPUnit_Framework_TestCase'notfoundinD:\xampp\htdocs\PHPUnit\index.phponline6代码是:assertEquals(0,count($stack));array_push($stack,'foo');$this->assertEquals('foo',$stack[count($stack)-1]);$this->assertEquals(1

phpMyAdmin fatal error : Call to undefined function __()

运行RHEL7和PHP5.4.16的服务器。当我尝试在浏览器中打开/phpMyAdmin时,出现错误:fatalerror:调用/usr/share/phpMyAdmin/libraries/core.lib.php中的未定义函数__()第242行CallStack#TimeMemoryFunctionLocation10.0008348000{main}()../index.php:020.0018503144require_once('/usr/share/phpMyAdmin/libraries/common.inc.php')../index.php:1230.02524224