【发布时间】:2010-03-28 02:23:33
【问题描述】:
我有这个脚本
<?php
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = dirname(__FILE__) . $_POST['folder'] . '/';
$pathinfoFile = pathinfo($_FILES['Filedata']['name']);
$targetFile = str_replace('//', '/', $targetPath) . uniqid() . '.' . $pathinfoFile['extension'];
move_uploaded_file($tempFile, $targetFile);
}
此脚本来自Uploadify,修改为使用唯一名称保存文件。用户上传文件后,我需要保存临时、唯一和原始名称。当用户最终提交表单时,将使用这些值。我试图将这些值保存在 $_SESSION 中,但我遇到了这里列出的问题:
http://uploadify.com/forum/viewtopic.php?f=5&t=43,
我尝试了论坛的解决方案,但没有成功,有没有更简单的方法来解决这个问题?
【问题讨论】:
-
您能否提供更多关于您如何实施uploadify 论坛链接中概述的解决方案的信息?
标签: php jquery ajax session uploadify