本文整理汇总了PHP中getCGI函数的典型用法代码示例。如果您正苦于以下问题:PHP getCGI函数的具体用法?PHP getCGI怎么用?PHP getCGI使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCGI函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_phplist_page
function get_phplist_page($php_sqlstr, $php_limit_length)
{
global $g_mysql;
$notify_buf = "";
$page_desc = "";
$limit_begin = 0;
$cgi = getCGI();
$page = $cgi[page];
$ppage = $cgi[ppage];
if ($page == "") {
$page = 0;
}
if ($ppage == "") {
$ppage = 0;
}
$limit_begin = $php_limit_length * $page;
$php_sqlstr = str_replace(" limit ", " limit {$limit_begin},", $php_sqlstr);
$php_sqlstr = str_replace("select ", "select SQL_CALC_FOUND_ROWS", $php_sqlstr);
$php_res = mysql_query($php_sqlstr, $g_mysql) or exit(mysql_error() . ":" . $php_sqlstr);
$sqlstr = "select FOUND_ROWS() as ct";
$res_ct = mysql_query($sqlstr, $g_mysql) or exit(mysql_error() . "\n" . $sqlstr);
$row = mysql_fetch_array($res_ct, MYSQL_ASSOC);
$ct = $row[ct];
if ($ct == "") {
$ct = 0;
}
$total_rec = $ct;
$page = new PAGE($ct, $ct, 0, $php_limit_length);
$page_list = $page->pagelist;
$page_notify = $page->notify;
$ret = array('page_list' => $page_list, 'page_notify' => $page_notify, 'php_res' => $php_res);
return $ret;
}
示例2: header
<?php
require_once "plib/config_inc.php";
$html_charset = HTML_CHARSET;
header("Content-type: text/html; charset={$html_charset}");
require_once "plib/head.php";
$cgi = getCGI();
$p_id = $cgi[p_id];
$t_id = $cgi[t_id];
if ($p_id == "" || $t_id == "") {
sys_exit("参数错误");
}
conProjDB($p_id, $t_id);
$i = 0;
foreach ($tempdef_data as $kk => $row) {
if ($row[t_id] != $t_id) {
continue;
}
if ($row[if_into_db] != "y") {
continue;
}
$sel_list .= "<option value=\"{$row['cname']}\">{$row['cname']}</option>";
}
?>
<select name=cond_type>
<option value="and">并且
<option value="or">或者
</select>