mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- MFH: make it portable and clean on in the clean section, session file may still be open (can't be deleted)
This commit is contained in:
parent
f1ebec34d9
commit
9d7904932f
1 changed files with 8 additions and 3 deletions
|
@ -8,7 +8,7 @@ session.name=PHPSESSID
|
|||
<?php
|
||||
|
||||
ini_set('session.use_trans_sid', 1);
|
||||
session_save_path(dirname(__FILE__));
|
||||
session_save_path(__DIR__);
|
||||
session_start();
|
||||
|
||||
ob_start();
|
||||
|
@ -23,8 +23,13 @@ ob_flush();
|
|||
|
||||
ob_end_clean();
|
||||
|
||||
unlink(dirname(__FILE__).'/sess_'.session_id());
|
||||
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . '/sess_'.session_id());
|
||||
foreach (glob(__DIR__ . '/sess_*') as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
<a href='a?q=1&PHPSESSID=%s&a=b'>asd</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue