当前位置: 首页>>代码示例>>PHP>>正文


PHP GMDate函数代码示例

本文整理汇总了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()
开发者ID:BackupTheBerlios,项目名称:sipums,代码行数:28,代码来源:page.php

示例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);
开发者ID:kinj1987,项目名称:evo-league,代码行数:31,代码来源:streak.php

示例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) {
开发者ID:bitweaver,项目名称:bitcart,代码行数:30,代码来源:categoryseqmod.php

示例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;
 }
开发者ID:xXThunderunXx,项目名称:TCB-Theme,代码行数:41,代码来源:SourceQuery.class.php

示例5: NoCACHE

function NoCACHE()
{
 header("Pragma:no-cache");
 header("Cache-Control:no-cache");
 header("Expires: ".GMDate("D, d M Y H:i:s")." GMT");
}
开发者ID:j2ghz,项目名称:IntranetGJAK-stary,代码行数:6,代码来源:login.php

示例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;
 }
开发者ID:ezpz-cz,项目名称:web-pages,代码行数:43,代码来源:SourceQuery.class.php

示例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;
 }
开发者ID:RaptorFactor,项目名称:SteamTracking,代码行数:21,代码来源:update.php

示例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";
}
开发者ID:BackupTheBerlios,项目名称:serweb-frmwrk,代码行数:76,代码来源:page.php


注:本文中的GMDate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。