[1042] XOOPS模組開發進階
<?php
/**
* Phone Book module
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package Phone Book
* @since 2.5
* @author tad
* @version $Id $
**/
/*-----------引入檔案區--------------*/
include "header.php";
/*-----------功能函數區--------------*/
$sql = "select * from `" . $xoopsDB->prefix("phone_book") . "`";
$result = $xoopsDB->query($sql) or web_error($sql);
while ($all = $xoopsDB->fetchArray($result)) {
$content[]=$all;
}
//die(var_export($content));
echo json_encode($content, JSON_UNESCAPED_UNICODE);
exit;