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


PHP SESSION_START函数代码示例

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


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

示例1: checkSafeFromSession

function checkSafeFromSession($safe)
{
    SESSION_START();
    if ($safe == $_SESSION["snumber"]) {
        return true;
    }
    return false;
}
开发者ID:ManuelSoftwareDev,项目名称:OShort,代码行数:8,代码来源:safe.php

示例2: login_chk

function login_chk()
{
    SESSION_START();
    $id = $_SESSION['los_id'];
    if (!$id) {
        exit("<script>location.href='./';</script>");
    }
}
开发者ID:webhacking,项目名称:los,代码行数:8,代码来源:config.php

示例3: haIniciadoSesion

function haIniciadoSesion()
{
    // CONTINUAR UNA SESIÓN INICIADA
    SESSION_START();
    // VERIFICAMOS LA EXISTENCIA DE LA VARIABLE DE SESIÓN
    if (isset($_SESSION['US_nombre'])) {
        return TRUE;
    }
    return FALSE;
}
开发者ID:kamilik26,项目名称:HTML,代码行数:10,代码来源:funciones.php

示例4: __construct

 public function __construct($state, $action)
 {
     SESSION_START();
     parent::__construct($state, $action);
     $this->ip = Ip::getClientIp();
     /*
             //控制外网IP访问管理功能
             if (substr($this->ip, 0, 3) != '10.') {
                 header("HTTP/1.0 404 Not Found");
                 exit;
             }
     */
 }
开发者ID:sdgdsffdsfff,项目名称:dagger_alarm,代码行数:13,代码来源:WapController.php

示例5: __construct

 public function __construct($state, $action)
 {
     SESSION_START();
     parent::__construct($state, $action);
     $this->ip = Ip::getClientIp();
     if (in_array($action, array('debug'))) {
         Switcher::close('postRefererCheck');
     }
     //控制外网IP访问管理功能
     if (substr($this->ip, 0, 3) != '10.') {
         header("HTTP/1.0 404 Not Found");
         exit;
     }
 }
开发者ID:sdgdsffdsfff,项目名称:dagger_alarm,代码行数:14,代码来源:ReportController.php

示例6: SESSION_START

<?php

SESSION_START();
if (isset($_SESSION['Username']) && isset($_SESSION['Password'])) {
    $sql = "SELECT \r\n\t\t\t\t\t*\r\n\t\t\t\tFROM\r\n\t\t\t\t\tmaster_user \r\n\t\t\t\tWHERE \r\n\t\t\t\t\tUsername = '" . $_SESSION['Username'] . "' \r\n\t\t\t\t\tAND Password = '" . $_SESSION['Password'] . "'";
    if (!($result = mysql_query($sql, $dbh))) {
        echo mysql_error();
        return 0;
    }
    $cek = mysql_num_rows($result);
    if ($cek != 1) {
        echo "<script>window.location='./'; </script>";
    }
    $sql = "SELECT\r\n\t\t\t\tNama,\r\n\t\t\t\tNilai\r\n\t\t\tFROM\r\n\t\t\t\tmaster_parameter";
    if (!($result = mysql_query($sql, $dbh))) {
        echo mysql_error();
        return 0;
    }
    while ($row = mysql_fetch_row($result)) {
        ${$row[0]} = $row[1];
    }
} else {
    echo "<script>window.location='./'; </script>";
}
开发者ID:ricmawan,项目名称:projects,代码行数:24,代码来源:GetSession.php

示例7: OpenDatabase

function OpenDatabase()
{
    $_db_host = "localhost";
    # meist localhost
    $_db_datenbank = "hififabrik_intern";
    $_db_username = "hififabrik_int";
    $_db_passwort = "Hf54mC74slRw";
    SESSION_START();
    # Datenbankverbindung herstellen
    $link = mysql_connect($_db_host, $_db_username, $_db_passwort);
    # Hat die Verbindung geklappt ?
    if (!$link) {
        die("Keine Datenbankverbindung möglich: " . mysql_error());
    }
    # Verbindung zur richtigen Datenbank herstellen
    $datenbank = mysql_select_db($_db_datenbank, $link);
    if (!$datenbank) {
        echo "Kann die Datenbank nicht benutzen: " . mysql_error();
        mysql_close($link);
        # Datenbank schliessen
        exit;
        # Programm beenden !
    }
    return $link;
}
开发者ID:Hifi-Fabrik,项目名称:hififabrik,代码行数:25,代码来源:config.php

示例8: __construct

 public function __construct()
 {
     $this->data = null;
     SESSION_START();
 }
开发者ID:pattycarvalho,项目名称:Zend,代码行数:5,代码来源:IndexController.php

示例9: CreateOrderHead

function CreateOrderHead($order, $MKZ, $UGP)
{
    SESSION_START();
    $userinfo = GetUserInfo();
    $ts = strtotime($order->order_date);
    $html = "<div style=\"font-family: Arial; font-size: 14px; \">";
    $html = $html . "Bestellung <b>" . $order->order_number . "</b> vom <b>" . date("d.m.Y G:i:s", $ts) . "</b><br>";
    $html = $html . "Besteller: <b>" . $order->ba_firstname . " " . $order->ba_lastname . "</b><br><br>\n";
    $html = $html . "Status: <b>" . $order->status . "</b><br><br>\n";
    $html = $html . "Lieferadresse:<br>\n";
    $html = $html . $order->firstname . " " . $order->lastname . "<br>\n";
    $html = $html . $order->street . "<br>\n";
    $html = $html . $order->country_id . "-" . $order->postcode . " " . $order->city . "<br><br>\n";
    if ($order->email != "" or $order->telephone != "") {
        $html = $html . "<table width=\"200\" cellpadding=\"1\">\n";
        $html = $html . "<style type=\"text/css\">\n";
        $html = $html . "table { width: 200px; }\n";
        $html = $html . "table { border-collapse: collapse;}\n";
        $html = $html . "table, td, th { border: 1px solid black; }\n";
        $html = $html . "td, th { height: 10px; font-family: Arial; font-Size: 12px};\n";
        $html = $html . "td, th { height: 10px; font-family: Arial; font-Size: 12px};\n";
        $html = $html . "th { text-align: right; };\n";
        $html = $html . "td { text-align: left; };\n";
        $html = $html . "</style>\n";
        //        $html = $html. "<div id=\"txtHint\"><b>Person info will be listed here...</b></div>";
        if ($order->email != "") {
            $html = $html . "<tr><td width=\"10%\">E-Mail</td><td width=\"20%\">" . $order->email . "</td><td width=\"60%\"></td></tr>";
        }
        if ($order->telephone != "") {
            $html = $html . "<tr><td width=\"10%\">Telefon</td><td width=\"20%\">" . $order->telephone . "</td><td width=\"60%\"></td></tr>";
        }
        $html = $html . "</table><br>\n";
    }
    $html = $html . "Zahlungsweise: <p style=\"font-family: Arial; font-size:18px;\" ><b>" . GetPayMethod($order->paymethod) . "</b></p>\n";
    $html = $html . "</div>";
    return $userinfo . $html;
}
开发者ID:Hifi-Fabrik,项目名称:hififabrik,代码行数:37,代码来源:getorder.php


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