草庐IT

undefined-symbol

全部标签

PHP 不会对 undefined variable 发出警告

如有错误请指正。据我所知,PHP应该对此发出警告,但实际上没有。我正在使用PHP5.2.17。我怎样才能解决这个问题?我假设这是在php.ini中的某处设置的? 最佳答案 查看errorreporting的文档.我相信如果您启用E_NOTICE,您会看到针对undefinedvariable的警告。您可以阅读所有错误报告常量here. 关于PHP不会对undefinedvariable发出警告,我们在StackOverflow上找到一个类似的问题: https

PHP: "Call to undefined method"... 但方法已定义?

我有一个Database.php类,它是一个抽象的Singleton类:其他数据库扩展了这个类并实现了抽象函数,这样我就可以改变我使用的数据库,同时确保我的应用程序仍然可以工作,只要它使用这个抽象层中的函数(我已经省略了函数定义来自上面的代码)。我在PDO.php中有一个PDO类。它扩展了数据库,还包括与上面相同的instance()函数,但它没有自己的$_instance变量。classPDOextendsDatabase{//...publicstaticfunctioninstance(){$class=get_called_class();if(!self::$_instanc

php - 为什么我在 Laravel View 中得到 "Undefined variable"?

当我尝试从类别所在的表中获取数据时,出现undefinedvariable:类别错误。$posts变量工作正常。@if(count($posts))@foreach($postsas$post)@if($post->category)category->name}}isotope-item">{{$post->updated_at}}{{Str::words($post->title,3)}}{{Str::words($post->body,60)}}{{HTML::linkRoute('posts.show','Readmore',array($post->id))}}@endif@

php - codeigniter 上的错误 undefined variable 替代

我在我的View文件中发现了这种错误类型,如下所示。请帮我解决这个错误。我很高兴能解决这个问题。我在等待正确答案遇到PHP错误严重性:通知消息:undefinedvariable:备选文件名:views/all_investor_relation.php行号:47$value){$paths=base_url().'uploads/investor_relation/';$image=$value['docpath'];$title=$value['title'];$imageso="$title";$content="".$i."".$imageso."}echo$content;}

javascript - 选择 2 类型错误 : b is undefined

我正在使用select2在下拉列表中显示ajax结果,但是当我将数据附加到select2时,它显示错误TypeError:bisundefinedJS代码varbaseurl=$("#baseurl").val();$(".myselect").select2({placeholder:"Selectainspector",allowClear:true,ajax:{url:baseurl+'/admin/getdata',dataType:'json',type:"GET",quietMillis:50,data:function(term){return{term:term.ter

php - Laravel undefined variable $articles

我正忙于我自己的新闻系统,我正在使用Laravel5。我对Laravel很陌生,并且使用教程来逐步了解它。现在我遇到了这个错误“undefinedvariable:文章”。这是我的ArticlesController.php这是我的news.blade.php@foreach($articlesas$article){{$article->title}}5December JohnDoe Category,Category 5Comments{{$article->body}}ReadMore@endforeach我已经尝试了一些事情,例如删除所有内容并重

php - 我该如何解决这个 undefined index 错误? Jquery Ajax 到 PHP

我正在使用Jquery、Ajax和PHP尝试发送要写入mysql数据库的变量。正在发出Ajax请求,但php.ini未获取变量。我不知道为什么会这样。使用firebug和console.log()我可以看到已经对write_results.php进行了POST如果我检查它说的Response注意:E:\write_results.php中2未定义索引:testscore这是我的PHP这是我的ajax脚本$(document).ready(function(){testscore="tryagain";//testvaluetoenterintothemysqldatabase$.aja

php - 获取 undefined variable : PHP_SELF

这是我从网站下载的应用程序代码,但它显示在错误日志中GettingUndefinedvariable:PHP_SELFonline150,inindex.php,现在第150行是"method="GET">这是表单的完整代码"method="GET">"name=p1>"name=p2> 最佳答案 它应该是$_SERVER变量中的索引:"...>当然,除非你定义它:$PHP_SELF=$_SERVER['PHP_SELF'];或者,您也可以省略它,因为您的目的是在当前页面中提交表单: 关

php - undefined offset PHP,不确定它的作用

这个问题在这里已经有了答案:"Notice:Undefinedvariable","Notice:Undefinedindex","Warning:Undefinedarraykey",and"Notice:Undefinedoffset"usingPHP(29个答案)关闭6个月前。我在PHPerror.log中有以下错误[TueDec1912:08:22.8875742017][:error][pid32196][clientxx.xx.xx.x:20560]PHPNotice:Undefinedoffset:8in/var/www/html/page.phponline55,ref

php - 在 CakePHP 2.0 中使用 Html Helper 时 undefined variable

我在第一次尝试CakePHP时收到此错误:Undefinedvariable:html[APP/View/Posts/index.ctp,line13]我有2.0-alpha版,是我弄错了版本还是又发生了什么变化。似乎找不到html助手。根据要求提供更多信息:这里是index.ctp文件link($post['Post']['title'],array('controller'=>'posts','action'=>'view',$post['Post']['id']));?>数据肯定会通过,但我得到的错误是第13行:Undefinedvariable:html[APP/View/Po