當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。