本文整理汇总了PHP中GMDate函数的典型用法代码示例。如果您正苦于以下问题:PHP GMDate函数的具体用法?PHP GMDate怎么用?PHP GMDate使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GMDate函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_html_head
function print_html_head($title=""){
global $config;
if (!$title) $title=$config->html_title;
if ($config->html_doctype=='strict'){
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<? }elseif ($config->html_doctype=='transitional'){
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<? }?>
<html>
<head>
<?if ($title){?><title><?echo $title;?></title><?}?>
<meta http-equiv="Content-Type" content="text/html; charset=<?echo $config->charset;?>">
<meta http-equiv="PRAGMA" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="<?echo GMDate("D, d M Y H:i:s")." GMT";?>">
<LINK REL="StyleSheet" HREF="<?echo ($config->style_src_path . "styles.css");?>" TYPE="text/css">
<? if (is_array($config->html_headers)) foreach($config->html_headers as $v) echo $v."\n"; ?>
<script language="javascript">
//DO NOT REMOVE!!! TABLE STRUCTURE WILL BE ALTERED
</script>
</head>
<?} //end function print_html_head()
示例2: array
$streak++;
} else {
$streak--;
}
}
if ($date_arr[$pointer] != $date_arr[$pointer - 1] || $num < $cur + 1) {
$fullStreak = 0;
if (array_key_exists($dateday, $winDays)) {
$fullStreak = $winDays[$dateday];
$color = $graph_green;
} else {
if (array_key_exists($dateday, $loseDays)) {
$fullStreak = $loseDays[$dateday];
$color = $graph_red;
} else {
$color = $graph_grey;
}
}
$out[$pointer] = array($streak, $color, $fullStreak);
$pointer++;
$streak = 0;
}
$cur++;
}
$imageurl = "grid.png";
$img = getGraph($out, $height, $width, $imageurl);
Header("Content-type: image/png");
$exp = GMDate("D, d M Y H:i:s", time() + 60 * 60 * 2);
Header("Expires: {$exp} GMT");
// Output Image data
imagepng($img);
示例3: FishNet
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
N. Michael Brennen
FishNet(R), Inc.
850 S. Greenville, Suite 102
Richardson, TX 75081
http://www.fni.com/
mbrennen@fni.com
voice: 972.669.0041
fax: 972.669.8972
*/
header("Expires: " . GMDate("D, d M Y H:i:s") . " GMT");
require_once '../../bit_setup_inc.php';
$gBitSystem->verifyPermission('bit_p_bitcart_admin');
require_once BITCART_PKG_PATH . 'functions.php';
// ========== start of variable loading ==========
// load passed variables and cookie variables
// int or double cast the numbers, no exceptions
$zoneid = (int) getparam('zoneid');
$langid = (int) getparam('langid');
$catcount = (int) getparam('catcount');
// values of catseq is an array handled below
// ========== end of variable loading ==========
require './admin.php';
require './header.php';
$fcc = new FC_SQL();
if (!$zoneid || !$langid) {
示例4: GetPlayers
/**
* Get players on the server
*
* @throws SourceQueryException
*
* @return bool|array Returns array with players on success, false on failure
*/
public function GetPlayers()
{
if (!$this->Connected) {
return false;
}
switch ($this->GetChallenge(self::A2S_PLAYER, self::S2A_PLAYER)) {
case self::GETCHALLENGE_FAILED:
return false;
case self::GETCHALLENGE_ALL_CLEAR:
$this->Socket->Write(self::A2S_PLAYER, $this->Challenge);
$this->Socket->Read();
$Type = $this->Buffer->GetByte();
if ($Type == 0) {
return false;
} else {
if ($Type != self::S2A_PLAYER) {
throw new SourceQueryException('GetPlayers: Packet header mismatch. (0x' . DecHex($Type) . ')');
}
}
break;
}
$Players = array();
$Count = $this->Buffer->GetByte();
while ($Count-- > 0 && $this->Buffer->Remaining() > 0) {
$Player['Id'] = $this->Buffer->GetByte();
// PlayerID, is it just always 0?
$Player['Name'] = $this->Buffer->GetString();
$Player['Frags'] = $this->Buffer->GetLong();
$Player['Time'] = (int) $this->Buffer->GetFloat();
$Player['TimeF'] = GMDate($Player['Time'] > 3600 ? "H:i:s" : "i:s", $Player['Time']);
$Players[] = $Player;
}
return $Players;
}
示例5: NoCACHE
function NoCACHE()
{
header("Pragma:no-cache");
header("Cache-Control:no-cache");
header("Expires: ".GMDate("D, d M Y H:i:s")." GMT");
}
示例6: GetPlayers
/**
* Get players on the server
*
* @throws InvalidPacketException
*
* @return bool|array Returns array with players on success, false on failure
*/
public function GetPlayers()
{
if (!$this->Connected) {
return false;
}
switch ($this->GetChallenge(self::A2S_PLAYER, self::S2A_PLAYER)) {
case self::GETCHALLENGE_FAILED:
return false;
case self::GETCHALLENGE_ALL_CLEAR:
$this->Socket->Write(self::A2S_PLAYER, $this->Challenge);
$this->Socket->Read(14000);
// Moronic Arma 3 developers do not split their packets, so we have to read more data
// This violates the protocol spec, and they probably should fix it: https://developer.valvesoftware.com/wiki/Server_queries#Protocol
$Type = $this->Buffer->GetByte();
if ($Type === 0) {
return false;
} else {
if ($Type !== self::S2A_PLAYER) {
throw new InvalidPacketException('GetPlayers: Packet header mismatch. (0x' . DecHex($Type) . ')', InvalidPacketException::PACKET_HEADER_MISMATCH);
}
}
break;
}
$Players = array();
$Count = $this->Buffer->GetByte();
while ($Count-- > 0 && $this->Buffer->Remaining() > 0) {
$Player['Id'] = $this->Buffer->GetByte();
// PlayerID, is it just always 0?
$Player['Name'] = $this->Buffer->GetString();
$Player['Frags'] = $this->Buffer->GetLong();
$Player['Time'] = (int) $this->Buffer->GetFloat();
$Player['TimeF'] = GMDate($Player['Time'] > 3600 ? "H:i:s" : "i:s", $Player['Time']);
$Players[] = $Player;
}
return $Players;
}
示例7: CreateHandle
private function CreateHandle($Master, $URL)
{
$Slave = cURL_Init();
$File = $URL['File'];
$Options = $this->Options;
$Options[CURLOPT_URL] = $this->GenerateURL($URL['URL']);
$this->Requests[(int) $Slave] = $File;
if ($this->UseCache) {
// If we have an ETag saved, add If-None-Match header
if (Array_Key_Exists($File, $this->ETags)) {
$Options[CURLOPT_HTTPHEADER] = array('If-None-Match: ' . $this->ETags[$File]);
} else {
if (File_Exists($File)) {
$Options[CURLOPT_HTTPHEADER] = array('If-Modified-Since: ' . GMDate('D, d M Y H:i:s \\G\\M\\T', FileMTime($File)));
}
}
}
cURL_SetOpt_Array($Slave, $Options);
cURL_Multi_Add_Handle($Master, $Slave);
return $Slave;
}
示例8: print_html_head
/**
* Print begin of html document
*
* Started by <!DOCTYPE....>
* flowed <html><head>.....
* and ending </head>
*
* @param array $parameters associative array containing info about page
*/
function print_html_head($parameters = array())
{
global $config, $lang_set, $controler;
if (empty($parameters['html_title'])) {
$title = $config->html_title;
} else {
$title = $parameters['html_title'];
}
header("Content-Type: text/html; charset=" . $lang_set['charset']);
if ($config->html_doctype == 'strict') {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
} elseif ($config->html_doctype == 'transitional') {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<?php
}
echo "<html>\n<head>\n";
if ($title) {
echo " <title>" . $title . "</title>\n";
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo $lang_set['charset'];
?>
" />
<?php
if (!empty($parameters['author_meta_tag'])) {
echo " <meta name=\"Author\" content=\"" . $parameters['author_meta_tag'] . "\" />\n";
}
?>
<meta http-equiv="PRAGMA" content="no-cache" />
<meta http-equiv="Cache-control" content="no-cache" />
<meta http-equiv="Expires" content="<?php
echo GMDate("D, d M Y H:i:s") . " GMT";
?>
" />
<?php
if (!empty($parameters['css_file'])) {
if (is_array($parameters['css_file'])) {
foreach ($parameters['css_file'] as $v) {
echo ' <LINK REL="StyleSheet" HREF="' . htmlspecialchars($v) . '" TYPE="text/css" />' . "\n";
}
} else {
echo ' <LINK REL="StyleSheet" HREF="' . htmlspecialchars($parameters['css_file']) . '" TYPE="text/css" />' . "\n";
}
}
if (!empty($parameters['ie_selects'])) {
// Workaround for ability to enable/disable options of selects.
// It is not needed since IE8 as IE finaly support it by itself.
echo ' <!--[if lt IE 8]><LINK REL="StyleSheet" HREF="' . htmlspecialchars($config->style_src_path . "core/ie_select.css.php") . '" TYPE="text/css" /><![endif]-->' . "\n";
}
if (isset($parameters['required_javascript']) and is_array($parameters['required_javascript'])) {
foreach ($parameters['required_javascript'] as $v) {
echo ' <script type="text/javascript" language="JavaScript" src="' . htmlspecialchars($config->js_src_path . $v) . '"></script>' . "\n";
}
}
if (isset($config->html_headers) and is_array($config->html_headers)) {
foreach ($config->html_headers as $v) {
echo $v . "\n";
}
}
echo "</head>\n";
}