本文整理汇总了PHP中main::output方法的典型用法代码示例。如果您正苦于以下问题:PHP main::output方法的具体用法?PHP main::output怎么用?PHP main::output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::output方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
<?php
/*
* WiND - Wireless Nodes Database
*
* Copyright (C) 2005 Nikolaos Nikalexis <winner@cube.gr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 dated June, 1991.
*
* 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. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
ob_start();
define("ROOT_PATH", "./");
include_once ROOT_PATH . "globals/common.php";
include_once ROOT_PATH . "includes/main.php";
$main = new main();
echo $main->output();
ob_end_flush();
示例2: foreach
if ($key == 0) {
$ex_echo .= '<tr>';
foreach ($value as $key2 => $value2) {
$ex_echo .= '<td>' . $key2 . '</td>';
}
$ex_echo .= '</tr>';
}
$ex_echo .= '<tr>';
foreach ($value as $key2 => $value2) {
$ex_echo .= '<td>' . $value2 . '</td>';
}
$ex_echo .= '</tr>';
}
}
$ex_echo .= '</table>';
echo '<tr><td>' . $query . '</td><td>' . $ex_echo . '</td><td>' . $time . '</td></tr>';
return $return;
}
}
$db = new database_debug($vars['db']['server'], $vars['db']['username'], $vars['db']['password'], $vars['db']['database']);
if ($db->error) {
die("WiND MySQL database error: {$db->error_report}");
}
include_once ROOT_PATH . "includes/main.php";
echo '<table border="1">';
$db->query("FLUSH QUERY CACHE");
$db->query("RESET QUERY CACHE");
$main = new main();
$main->output();
echo '</table>';
ob_end_flush();