<link href="uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="uploadify/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="uploadify/swfobject.js"></script>
<script type="text/javascript" src="uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#file_upload').uploadify({
'uploader' : 'uploadify/uploadify.swf?var='+(new Date()).getTime(),
'script' : 'uploadify/uploadify.php?PHPSESSID=<?php echo session_id();?>',
'cancelImg' : 'uploadify/cancel.png',
'fileDesc' : 'pdf/jpg/jpeg/bmp/gif/png/doc/xls/txt/rar/zip/',
'fileExt' : '*.jpg;*.pdf;*.bmp;*.gif;*.png;*.doc;*.xls;*.txt;*.rar;*.zip',  
'folder' : '/uploadfile',  
'auto' : true,
'removeCompleted' : false
}); });
</script>在服务上uploadfile文件夹中见不到我上传的文件 此文件夹已经有写入的权限了 在本地电脑上测试一切正常 
 
 

解决方案 »

  1.   

    你贴 js 代码有什么用!?
    关键在于你 uploadify/uploadify.php 都得到了些什么
      

  2.   

    谢谢 是路径的问题if (!empty($_FILES)) {
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
    $name=$_FILES['Filedata']['name'];
    $ext=file_exte($name);
    $time1=date('Ymdhis');
    $newname=$time1.".".$ext;
    //$targetFile = str_replace('//','/',$targetPath) . $newname; 
    $targetFile ="./uploadfile/".$newname;
    move_uploaded_file($tempFile,$targetFile);
    echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);
    $_SESSION['filedir']="./uploadfile/".$newname;
    }
    //$targetFile = str_replace('//','/',$targetPath) . $newname; 
    $targetFile ="./uploadfile/".$newname; str_replace('//','/',$targetPath)获取不到路径,我直接给"./uploadfile/ 写上去就可以了