找到文件:lib_common.php 找到代码:650-680行
/** * 获得某个分类下 * * @access public * @param int $cat * @return array */ function get_brands($cat = 0, $app = 'brand') { global $page_libs; $template = basename(PHP_SELF); $template = substr($template, 0, strrpos($template, '.')); include_once(ROOT_PATH . ADMIN_PATH . '/includes/lib_template.php'); static $static_page_libs = null; if ($static_page_libs == null) { $static_page_libs = $page_libs; } $children = ($cat > 0) ? ' AND ' . get_children($cat) : ''; $sql = "SELECT b.brand_id, b.brand_name, b.brand_logo, b.brand_desc, COUNT(*) AS goods_num, IF(b.brand_logo > '', '1', '0') AS tag ". "FROM " . $GLOBALS['ecs']->table('brand') . "AS b, ". $GLOBALS['ecs']->table('goods') . " AS g ". "WHERE g.brand_id = b.brand_id $children AND is_show = 1 " . " AND g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 ". "GROUP BY b.brand_id HAVING goods_num > 0 ORDER BY tag DESC, b.sort_order ASC"; if (isset($static_page_libs[$template]['/library/brands.lbi'])) { $num = get_library_number("brands"); $sql .= " LIMIT $num ";修改代码结束处的:$sql .= " LIMIT $num "; 中的$num 为数字就可以了!