note 50355 added to function.session-save-path
| From: | gt at psgam dot de | Date: | Fri, 25 Feb 2005 13:58:49 +0000 |
| Subject: | note 50355 added to function.session-save-path | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85537@lists.php.net to get a copy of this message | ||
Note that you shouldn't use session_save_path() directly for performing file operations.
It returns the configuration option, not the directory.
As stated in /manual/en/ref.session.php#ini.session.save-path there can be a numeric argument
separated with a semicolon in front of the "real" path.
I used the following code to get rid of it:
<?php
$sessionpath = session_save_path();
if (strpos ($sessionpath, ";") !== FALSE)
$sessionpath = substr ($sessionpath, strpos ($sessionpath, ";")+1);
?>
Doesn't allow ; to appear in the directory names, but hey.
Regards,
Gero
----
Manual Page -- http://www.php.net/manual/en/function.session-save-path.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50355
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50355&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50355&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50355&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50355&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50355&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50355&report=yes
Search -- http://master.php.net/manage/user-notes.php