我正在尝试将SWFUpload集成到Joomla中(自定义实现,这就是为什么不能将扩展与swfupload一起使用的原因)。
如果会话和服务器端我需要获取传递 ID 的所有数据 $_SESSION,我正在通过 SWFU加载 ID。
这是我拥有的代码(直接脚本访问):基于本教程
if (isset($_POST["PHPSESSID"])) {
session_write_close(); // End the previously-started session
session_id($_POST["PHPSESSID"]); // Set the new session ID
session_start(); // Start it
}
这是我在SWFUpload调试窗口中收到的错误:
Fatal error: session_start(): Failed to initialize storage module: user (path: /var/lib/php5) in /srv/www/htdocs_appsrv/.../incoming.php on line 19
19号线是
session_start();
如何重新启动具有会话 ID 的会话,然后从 $_SESSION 中获取所有需要的数据?
好的,下面的代码似乎有效
if (isset($_POST["PHPSESSID"])) {
session_write_close(); // End the previously-started session
$jd = new JSessionStorageDatabase();
session_id($_POST["PHPSESSID"]); // Set the new session ID
session_start(); // Start it
}
我发现基于本教程
你试过吗:
JFactory::getSession()->destroy();