我有一个会话安全的文件"admin.php".这是登录后的默认页面.这引发了以下错误:
致命错误:在第14行的C:\ xampp\htdocs\cd-website\cms\admin.php中调用未定义的函数listPages()
<?php
/*
* initialize session for admin
*/
session_start();
if(isset($_SESSION['admin_user']))
{
require_once '../cms/config.php';
$action = isset($_POST['action']) ? $_POST['action'] : '';
if ($action == null)
{
listPages();
exit;
}
/*
* using switch for choosing function
*/
switch($action)
{
case 'ManagePages':
ManagePages();
break;
case 'listUsers':
listUsers();
break;
case 'orderList':
listOrders();
break;
case 'listBanner':
listBanners();
break;
case 'NewsletterUser':
NewsletterUsers();
break;
case 'Newsletter':
Newsletter();
break;
case 'listQuestion':
listquestions();
break;
case 'testinomial':
listTesti();
break;
default:
listPages();
}
/*
* different function …Run Code Online (Sandbox Code Playgroud)