English 中文(简体)
Valums jquery 上传器有效, 但返回“ 失败 ”
原标题:Valums jquery uploader works but returns "Failed"

Im trying to setup a page with multiple file uploader sections
anyway it was working fine so far but i have encountered a little problem:

我希望每次使用该页面上的上传者时都为文件创建一个新文件夹 。

所以我在 valums 用于处理上传程序的 php.php 中添加一个 < code> mkdir 命令 。

With that mkdir inside the php.php, the folder gets created and files get uploaded so the procedure works...
BUT i get a "failed" message next to each filename on the transferlist.

没有这个 mkdir ,整个事情就会正常运转。

我该从哪儿开始找 有什么想法吗

这里的代码是代码

                <script>        
    function createUploader<?php  echo $c; ?>(){            
        var uploader = new qq.FileUploader({
            element: document.getElementById( uploadroom<?php  echo $c; ?> ),
            action:  ../common/jqueryplugins/valums/server/php.php ,
            debug: true,
    // ex. [ jpg ,  jpeg ,  png ,  gif ] or []
    allowedExtensions: [ jpg ,  jpeg ,  png ,  gif ],
    dragDrop: false,
    params: {
            planid:  <?php  echo $_SESSION[ planid ]; ?> ,
            roomname:  room<?php  echo $c;   ?> 
        }
        });           
    }


  $(document).ready(function(){createUploader<?php  echo $c; ?>();  });
                </script>   

i m getting some variables from php, as this part is being replicated a bunch of times, different buttons upload to different folders.

inside the php.php file (at the top) i got something like this:
$uploaddir = ../../../../rental/userfiles/1/ .$_GET[ planid ]. /images/ .$_GET[ roomname ]. / ;

mkdir($uploaddir; ($uploaddir);

a weird uploaddir and my mkdir command
and at the end:

 `$result = $uploader->handleUpload($uploaddir);`  

these are mostly the things ive changed
and i get a "failed" next to the filename although it works perfectly

问题回答

如果您没有装入所提供的 CSS, 它将会显示失败 。 默认情况下, 间隔会被隐藏 。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签