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


PHP fSession::delete方法代码示例

本文整理汇总了PHP中fSession::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP fSession::delete方法的具体用法?PHP fSession::delete怎么用?PHP fSession::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fSession的用法示例。


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

示例1: testDelete

 public function testDelete()
 {
     fSession::open();
     $_SESSION['delete'] = TRUE;
     fSession::delete('delete');
     $this->assertEquals(FALSE, isset($_SESSION['delete']));
 }
开发者ID:philip,项目名称:flourish,代码行数:7,代码来源:fSessionTest.php

示例2: retrieve

 /**
  * Retrieves and removes a message from the session
  *
  * @param  string $name       The name of the message to retrieve
  * @param  string $recipient  The intended recipient
  * @return string  The message contents
  */
 public static function retrieve($name, $recipient = NULL)
 {
     if ($recipient === NULL) {
         $recipient = '{default}';
     }
     $key = __CLASS__ . '::' . $recipient . '::' . $name;
     $message = fSession::get($key, NULL);
     fSession::delete($key);
     return $message;
 }
开发者ID:gopalgrover23,项目名称:flourish-classes,代码行数:17,代码来源:fMessaging.php

示例3: getRequestedURL

 /**
  * Returns the URL requested before the user was redirected to the login page
  *
  * @param  boolean $clear        If the requested url should be cleared from the session after it is retrieved
  * @param  string  $default_url  The default URL to return if the user was not redirected
  * @return string  The URL that was requested before they were redirected to the login page
  */
 public static function getRequestedURL($clear, $default_url = NULL)
 {
     $requested_url = fSession::get(__CLASS__ . '::requested_url', $default_url);
     if ($clear) {
         fSession::delete(__CLASS__ . '::requested_url');
     }
     return $requested_url;
 }
开发者ID:gopalgrover23,项目名称:flourish-classes,代码行数:15,代码来源:fAuthorization.php

示例4:

$errmsg = '';
if (fRequest::isPost()) {
    $old_password = fRequest::get('old-password');
    $new_password = fRequest::get('new-password');
    $confirm_password = fRequest::get('confirm-password');
    $token = fAuthorization::getUserToken();
    $username = $token['name'];
    $user_id = $token['id'];
    if (empty($old_password) or empty($new_password) or empty($confirm_password)) {
        $errmsg = '密码不能为空';
    } else {
        if ($new_password != $confirm_password) {
            $errmsg = '两次输入的新密码不一致';
        } else {
            if (login_check_credential($db, $username, $old_password) == false) {
                $errmsg = '旧密码错误';
            } else {
                if (login_change_password($db, $user_id, $new_password)) {
                    fURL::redirect(fSession::delete('change-password-referer', SITE_BASE));
                } else {
                    $errmsg = '修改密码失败';
                }
            }
        }
    }
} else {
    if (fSession::get('change-password-referer') == null) {
        fSession::set('change-password-referer', login_get_referer(SITE_BASE));
    }
}
include __DIR__ . '/tpl/change-password.php';
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:31,代码来源:change-password.php

示例5: testDeleteNestedArraySyntax

 public function testDeleteNestedArraySyntax()
 {
     fSession::open();
     $_SESSION['delete'] = array('foo' => array('bar' => 'baz'));
     $this->assertEquals('baz', fSession::delete('delete[foo][bar]'));
     $this->assertEquals(array('foo' => array()), $_SESSION['delete']);
 }
开发者ID:nurulimamnotes,项目名称:flourish-old,代码行数:7,代码来源:fSessionTest.php


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