本文整理汇总了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']);
}
示例2:
<?php
require_once 'init.php';
fSession::close();
fSession::destroy();
fAuthorization::destroyUserInfo();
header('Location: ' . LOGIN);
示例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";
}