<?php require 'inc.php'; require_once '../../weixin/DateUtil.php'; require_once '../../weixin/globleconfig.php'; require_once "../includes/Pager.class.php"; if (empty($_SESSION["cn_sysadmin"])) { die("<script>top.location.href='login.php'</script>"); } $action = empty($_GET["action"]) ? '' : $_GET["action"]; if ($action == "") { showlist(); } elseif ($action == "toaddpage") { $smarty->display('sysadmin/addgroup.html'); } elseif ($action == "addone") { addone(); } elseif ($action == "deleteselected") { deleteselected(); } function showlist() { global $db; global $smarty; $page_size = getPageSize(); // 每页显示的条目数 $sub_pages = getSubPages(); // 每次显示的页数 $current_page = empty($_GET["p"]) ? "1" : $_GET["p"]; // 当前被选中的页 $sql = "SELECT * FROM wx_group_info"; $res = $db->query_page_list2($sql, $page_size, $current_page);
echo $name(2, 3) . '<br />'; $name = sumadd; //notice error echo $name(2, 3) . '<br />'; $a = 5; function addone($a) { global $a; //functions after global acts;global in function acts(not for include and require) $a++; } addone($a); echo $a . '<br />'; addone($a); echo $a . '<br />'; addone($a); echo $a . '<br />'; function quarter() { $b = 1600; echo $b / 4 . '<br />'; } quarter(); quarter(); quarter(); function quarte() { static $b = 1600; //$b=1600;static $b;--all 0 | static $b;$b=1600;--all 400 $b = $b / 4; echo $b . '<br />';