<?php
$db_config["hostname"] = "127.0.0.1"; //服务器地址
$db_config["username"] = "root"; //数据库用户名
$db_config["password"] = "root"; //数据库密码
$db_config["database"] = "wap_blueidea_com"; //数据库名称
$db_config["charset"] = "utf8";
$config["charset"] = "utf-8"; //网站编码
include('db.php');
include('pagelist.php');
$db = new db();
$db->connect($db_config);
header("content-type:text/html;charset=".$config["charset"]);//设置页面编码
$pl = new pagelist();
$arr = $pl->get_rows('table_name');
unset($pl);
echo '<pre style="text-align:left">';
print_r($arr);
echo '</pre>';
//指定特殊 sql 时候
$pl = new pagelist();
$sql = 'SELECT * FROM `wap_article` AS a, `wap_article_info` AS b WHERE a.id=b.articleid';
$arr = $pl->get_rows_sql($sql);
unset($pl);
echo '<pre style="text-align:left">';
print_r($arr);
echo '</pre>';
?>
您可能感兴趣的文章: