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


PHP session_ID函数代码示例

本文整理汇总了PHP中session_ID函数的典型用法代码示例。如果您正苦于以下问题:PHP session_ID函数的具体用法?PHP session_ID怎么用?PHP session_ID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了session_ID函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ADODB_Session_Key

 function ADODB_Session_Key()
 {
     $ADODB_CRYPT_KEY = 'CRYPTED ADODB SESSIONS ROCK!';
     /* USE THIS FUNCTION TO CREATE THE ENCRYPTION KEY FOR CRYPTED SESSIONS	*/
     /* Crypt the used key, $ADODB_CRYPT_KEY as key and session_ID as SALT	*/
     return crypt($ADODB_CRYPT_KEY, session_ID());
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:7,代码来源:adodb-cryptsession.php

示例2: qrCode

 /**
  * Create qrcode for mobile login.
  * 
  * @access public
  * @return void
  */
 public function qrCode()
 {
     $loginAPI = common::getSysURL() . $this->config->webRoot;
     if ($this->loadModel('user')->isLogon()) {
         $loginAPI .= "?sid=" . session_ID();
     }
     if (!extension_loaded('gd')) {
         die(printf($this->lang->misc->noGDLib, $loginAPI));
     }
     $ciqrcode = $this->app->loadClass('qrcode');
     QRcode::png($loginAPI, false, 4, 9);
 }
开发者ID:laiello,项目名称:zentaoms,代码行数:18,代码来源:control.php

示例3: finalSetup

 /**
  * Do final user setup and page config
  * @param object $userInfo - user login info from database
  */
 private function finalSetup($userInfo)
 {
     // set up final properties
     $this->sessionToken = session_ID();
     if ($this->loggedIn) {
         $this->userInfo = $userInfo;
         $this->succesfullLoginSessionCheck();
     }
     // send page cacheing parameters
     if (!$this->config->pageCaching) {
         // Date in the past
         header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
         // always modified
         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);
         // HTTP/1.0
         header("Pragma: no-cache");
     }
     // send time for page valid if time specified is greater than 0
     if ($this->config->pageValid > 0) {
         header("Expires: " . gmstrftime("%a, %d %b %Y %H:%M:%S", gmmktime() + $this->config->pageValid) . " GMT");
     }
 }
开发者ID:julesbl,项目名称:ssp,代码行数:29,代码来源:ProtectBase.php

示例4: sid

 static function sid()
 {
     return "session=" . session_name() . "=" . session_ID();
 }
开发者ID:aydancoskun,项目名称:octobercms,代码行数:4,代码来源:database.php

示例5: session_ID

}
include "header.php";
?>

<div class="banner">
    <div class="row">
        <h3 class="text-center"><?php 
echo "Your order was received.  Cheers!<br />";
?>
</h3>
    </div>
</div>

<div class="fullContent"><div class="row">
    <h4>Order Confirmation ID: <?php 
echo session_ID();
?>
</h4>
    <div class="large-6 columns">
        <?php 
echo "Order Summary<br />";
$session_id = session_id();
$sql = "select * from products,cart where (cart.session_id='{$session_id}') and (cart.product_id = products.id)";
$result = mysqli_query($connection, $sql);
while ($row = mysqli_fetch_assoc($result)) {
    echo $row["product_name"] . " | QTY: " . $row["quantity"] . "<br />";
    $contents = $contents . $row["product_name"] . " | QTY: " . $row["quantity"] . "\n";
    $quantity_remaining = $row["quantity_remaining"] - $row["quantity"];
    //update quantity_remaining entry
    mysqli_query($connection, "update products set quantity_remaining='{$quantity_remaining}' where {$row['product_id']} = id");
}
开发者ID:erinmquevedo,项目名称:csis3030_quevedo,代码行数:31,代码来源:checkout_process.php


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