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


PHP sessionStatus函数代码示例

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


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

示例1: websiteHeader

<!--
Index Page: Last edited 12.10.15
-->
<?php 
include "config.php";
include "functions.php";
websiteHeader();
?>

<body>

<div id="background">

<?php 
if (!sessionStatus()) {
    ?>

  <div id="login">
    <div class="logo"></div>
    <p class="landing-message">Whether it's a book you're looking for or a book you're willing to share, Booklend is a powerful extension of your library.</p>
    <div id="signin-error"></div>
    <div class="login-form">
      <form method="post" action="index.php" name="loginForm" id="loginForm" onsubmit="return checkLogin();"> <!-- Login Form -->
      <input type="text" name="email" id="email" placeholder="UNIVERSITY EMAIL" />
      <input type="password" name="password" id="password" placeholder="PASSWORD" />
      <input type="password" name="confirmPassword" id="confirmPassword" placeholder="CONFIRM PASSWORD" class="hidden-register" />
      <div class="submit-buttons">
        <input type="submit" name="login" id="Login" value="LOGIN" class="close-login" id="button"/>
        <p class="signup-button close-login">or <span class="signup"><u>Signup</u></span></p>
        <input type="submit" name="signup" id="Signup" value="SIGN UP" class="hidden-register" id="button" />
        <p class="login-button hidden-register">or <span class="login"><u>Login</u></span></p>
开发者ID:Choc-Orange,项目名称:BLT-Application,代码行数:31,代码来源:index.php

示例2: chdir

<?php

// Cambiar de directorio.
chdir('..');
require_once 'base.php';
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
    if (sessionStatus()) {
        $json = array('result' => false);
        $d_docume = filter_var($_GET['d_docume'], FILTER_SANITIZE_NUMBER_INT);
        $query = $db->query("select * from docente where d_docume='{$d_docume}';");
        $json = $query->fetch(PDO::FETCH_OBJ);
        echo json_encode($json, JSON_FORCE_OBJECT);
    } else {
        error404();
    }
} else {
    error404();
}
开发者ID:serggiod,项目名称:sej,代码行数:18,代码来源:docente.get.php

示例3: header

header('Content-type: application/json');
session_start();
include 'cred.php';
$mysqli = new mysqli("oniddb.cws.oregonstate.edu", "johnsjo3-db", $ecret, "johnsjo3-db");
if ($mysqli->connect_errno) {
    sendError("Failed to connect to database (" . $mysqli->connect_errno . ") " . $mysqli->connect_error);
    exit;
}
$requestMethod = $_SERVER["REQUEST_METHOD"];
if (!($requestMethod == 'GET')) {
    exit;
}
if (isset($_GET['action'])) {
    if ($_GET['action'] == 'sessionStatus') {
        sessionStatus();
    }
    if ($_GET['action'] == 'login') {
        login($mysqli);
    }
    if ($_GET['action'] == 'logout') {
        logout();
    }
    if ($_GET['action'] == 'signUp') {
        signUp($mysqli);
    }
}
/*******************************
Functions
*********************************/
function connectDatabase()
开发者ID:JoshJ-OSU,项目名称:final-project,代码行数:30,代码来源:login.php


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