希望有人可以帮助我解决Call to undefined function错误我在以下代码中得到:
$query = \FreePBX::Database()->query('SELECT model, dns, buttons, loadimage
FROM sccpdevmodel
WHERE dns > 0
ORDER BY model');
$res = $query->fetchAll();
foreach ($res as $row) {
$modelData['model'][] = $row[0];
$modelData['dns'][] = $row[1];
$modelData['buttons'][] = $row[2];
$modelData['loadimage'][] = $row[3];
}
return $modelData;
第一部分似乎没问题,然后我$modelData = sccp_get_model_data();
在这一行得到错误。
<?php
$modelData = sccp_get_model_data();
$numModels = count($modelData['model']);
$addonData = sccp_get_addon_data();
$numAddons = count($addonData['model']);
?>
有什么建议吗?
这是源文件的链接,如果有人可以帮忙吗? https://github.com/Cynjut/SCCP_Manager/tree/master