本文整理匯總了PHP中Data::getVar方法的典型用法代碼示例。如果您正苦於以下問題:PHP Data::getVar方法的具體用法?PHP Data::getVar怎麽用?PHP Data::getVar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Data
的用法示例。
在下文中一共展示了Data::getVar方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
/*
* $Id: setup.php,v 1.3 2005/09/11 23:29:43 mmr Exp $
* mmr 2005-02-10
*/
// Headers
header('Expires: Wed, 06 Aug 2003 15:50:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
// HTTP/1.1
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Cache-Control: private');
// HTTP/1.0
header('Pragma: no-cache');
// Getting vars from $_REQUEST
Data::getVar('id', $d['id']);
Data::getVar('action', $d['action']);
Data::getVar('language', $d['language']);
Data::getVar('author', $d['author']);
Data::getVar('title', $d['title']);
Data::getVar('source', $d['source']);
Data::getVar('seccode', $d['seccode']);
// Rewrite
if (b1n_REWRITE_ON) {
define('b1n_URL', 'http://' . $_SERVER['HTTP_HOST']);
define('b1n_URL_ACTION', b1n_URL . '/' . $_SERVER['SCRIPT_NAME']);
define('b1n_URL_ID', b1n_URL . '/');
} else {
define('b1n_URL', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);
define('b1n_URL_ID', b1n_URL . '?id=');
}
示例2:
<?php
/*
* $Id: left.inc.php,v 1.3 2005/09/11 23:29:43 mmr Exp $
* mmr 2005-01-28
*/
$q = Data::getVar('q', $d['q']);
?>
<div id='links'>
<a href='<?php
echo b1n_URL;
?>
'
title='Novo Paste'>Novo Paste</a> |
<a href='<?php
echo b1n_URL_ACTION;
?>
?action=random'
title='Aleatório'>Aleatório</a>
<form id='fs' method='get' action='<?php
echo b1n_URL;
?>
'>
<p>
<b>Busca</b><br />
<input type='hidden' name='action' value='list' />
<input type='text' name='q' value='<?php
echo $d['q'];
?>
'
示例3: Search
<?php
// $Id: list.inc.php,v 1.10 2005/02/07 04:05:41 mmr Exp $
Data::getVar('pg', $d['pg']);
Data::getVar('order', $d['order']);
Data::getVar('q', $d['q']);
Data::getVar('orderby', $d['orderby']);
$d['per_page'] = b1n_SEARCH_PER_PAGE;
require b1n_PATH_LIB . '/Search.lib.php';
$search = new Search($sql);
echo $search->show($d);