1
我有一個即時通訊使用測試RRD支持這個PHP文件:PHP未被捕獲的錯誤時,測試RRD支持
<?php
$result=rrd_fetch("/ang.rrd", array("AVERAGE", "--resolution", "60", "--start", "-1d", "--end", "start+1h"));
foreach ($result["data"]["myfield"] as $key => $value)
{
echo "At timestamp $key, the value for myfield is $value.\n";
}
?>
如果我瀏覽到該文件,我得到以下幾點:
PHP Fatal error: Uncaught Error: Call to undefined function rrd_fetch() in /var/www/html/graph.php:2\nStack trace:\n#0 {main}\n thrown in /var/www/html/graph.php on line 2
,如果我嘗試運行該命令行上的文件我得到以下內容:
PHP Notice: Undefined index: myfield in /var/www/html/graph.php on line 4
PHP Warning: Invalid argument supplied for foreach() in /var/www/html/graph.php on line 4
我不知道爲什麼。請問某人爲什麼會發生這種情況?
你需要回應你的函數'rrd_fetch()' –
@RïshïKêshKümar怎麼會是解決_「調用未定義功能「_-錯誤? –
@MagnusEriksson它實際上定義了功能 –