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


PHP fSession::close方法代码示例

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


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

示例1: testCloseAndOpen

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

示例2:

<?php

require_once 'init.php';
fSession::close();
fSession::destroy();
fAuthorization::destroyUserInfo();
header('Location: ' . LOGIN);
开发者ID:nevermind89x,项目名称:Mi-morelia,代码行数:7,代码来源:logout.php

示例3: sendmail

 public function sendmail()
 {
     if (!UserHelper::isEditor()) {
         throw fValidationException('not allowed');
     }
     fSession::close();
     set_time_limit(0);
     print "<pre>\n";
     $emails = array();
     $cons = array();
     $field = trim(fRequest::get('field'));
     $start_year = trim(fRequest::get('start_year'));
     $major = trim(fRequest::get('major'));
     $location = trim(fRequest::get('location'));
     $words = trim(fRequest::get('words'));
     $title = trim(fRequest::get('mail-title'));
     $content = trim(fRequest::get('mail-content'));
     $cons['login_name|display_name~'] = $words;
     if (!empty($field)) {
         $cons['field='] = $field;
     }
     if (!empty($start_year)) {
         $cons['start_year='] = $start_year;
     }
     if (!empty($major)) {
         $cons['major='] = $major;
     }
     if (!empty($location)) {
         $cons['location~'] = $location;
     }
     $users = fRecordSet::build('Profile', $cons, array('id' => 'asc'));
     foreach ($users as $profile) {
         $emails[] = $profile->getEmail();
     }
     $emails = array_filter(array_unique($emails), 'strlen');
     foreach ($emails as $email) {
         try {
             self::send($email, $title, $content);
             print 'Sent notice mail to ' . $email . "\n";
         } catch (Exception $e) {
             print "Error occurred when sending mail to {$email}: " . $e->getMessage() . "\n";
         }
         flush();
     }
     print "<a href='javascript:history.go(-1);'>Go Back</a>\n";
 }
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:46,代码来源:AdminController.php


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