^我的页面是什么样的。
出于某种原因,我收到此错误
PHP致命错误:未捕获错误:在/var/www/html/ininpot/application/views/index/index.volt.php:146 \ nStack trace中调用null上的成员函数getHash():\ n# 0 [内部函数]:未知()\ n#1 [内部函数]:Phalcon \ Mvc \ View \ Engine \ Volt-> render('../ application / ...',Array,true)\ n# 2 [内部函数]:Phalcon \ Mvc \ View-> _engineRender(数组,'index / index',true,true,NULL)\ n#3 [内部函数]:Phalcon \ Mvc \ View-> render(' index','index',Array)\ n#4 /var/www/html/coinpot/public/index.php(158):Phalcon \ Mvc \ Application-> handle()\ n#5 {main} \在第146行的/var/www/html/coinpot/application/views/index/index.volt.php中抛出
加载我的页面时。
我也遇到了一些其他错误。
[Sat Oct 08 09:35:39.137966 2016] [:error] [pid 24670] [client ] PHP Notice: Trying to get property of non-object in /var/www/html/coinpot/application/controllers/BaseController.php on line 37
[Sat Oct 08 09:35:39.143992 2016] [:error] [pid 24670] [client ] PHP Notice: Undefined variable: pool in /var/www/html/coinpot/application/views/index/index.volt.php on line 101
[Sat Oct 08 09:35:39.144012 2016] [:error] [pid 24670] [client ] PHP Notice: Trying to get property of non-object in /var/www/html/coinpot/application/views/index/index.volt.php on line 101
[Sat Oct 08 09:35:39.144037 2016] [:error] [pid 24670] [client ] PHP Notice: Undefined variable: deposits in /var/www/html/coinpot/application/views/index/index.volt.php on line 134
[Sat Oct 08 09:35:39.144050 2016] [:error] [pid 24670] [client ] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/coinpot/application/views/index/index.volt.php on line 134
[Sat Oct 08 09:35:39.144070 2016] [:error] [pid 24670] [client ] PHP Notice: Undefined variable: pool in /var/www/html/coinpot/application/views/index/index.volt.php on line 146
第136-152行index.volt.php
function decimalPlaces(float,length) {
ret = "";
str = float.toString();
array = str.split(".");
if(array.length==2) {
ret += array[0] + ".";
for(i=0;i<length;i++) {
if(i>=array[1].length) ret += '0';
else ret+= array[1][i];
}
} LINE 146
else if(array.length == 1) {
ret += array[0] + ".";
for(i=0;i<length;i++) {
ret += '0'
}
}
答案 0 :(得分:0)
我看不到index.volt.php所以我的猜测就是这个。
在()括号中的getHash函数的变量或变量之后,将= NULL
添加到index.volt.php第146行。
此通知也会在localhost中显示,但不会在线显示。您可以添加error_reporting(E_ALL & ~E_NOTICE);
或在php.ini中更改它以删除通知。您无需修改通知。