swfupload:如何在上传开始前添加帖子参数?

时间:2011-10-29 22:22:21

标签: javascript swfupload

          function uploadStart() {
        swfu.addPostParam("PHPSESSID", "<?php echo session_id(); ?>");
        swfu.addPostParam("photonum", "1");
        swfu.addPostParam("itemid", "<?php echo $row[id]; ?>");
      }

OR

              function uploadStart() {
        this.addPostParam("PHPSESSID", "<?php echo session_id(); ?>");
        this.addPostParam("photonum", "1");
        this.addPostParam("itemid", "<?php echo $row[id]; ?>");
      }

以上代码不起作用! upload.php脚本不接收$ _POST [itemid]或任何其他参数。

请帮忙。

1 个答案:

答案 0 :(得分:2)

忘了设置:

upload_start_handler : uploadStart