本文整理汇总了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());
}
示例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);
}
示例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");
}
}
示例4: sid
static function sid()
{
return "session=" . session_name() . "=" . session_ID();
}
示例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");
}