note 50355 deleted from function.session-save-path by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 10:15:31 +0000 |
| Subject: | note 50355 deleted from function.session-save-path by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196947@lists.php.net to get a copy of this message | ||
Note Submitter: gt at psgam dot de
----
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