开发者

swfupload session problem destroy session

开发者 https://www.devze.com 2023-02-03 15:34 出处:网络
I have a problem with swfupload. I am passing session_id() like this Note : It is working fine on my local machine, am using MAMP. but its not working at server

I have a problem with swfupload. I am passing session_id() like this

Note : It is working fine on my local machine, am using MAMP. but its not working at server

  /upload-file.php?s='<?php echo session_id()';
  /upload-file.php?s=189477fcfa1ec7f630e70a09e1e84cae

but its not maintaining session and destroying my current session (logging me out) here开发者_开发技巧 is code in file upload.

<?php

 if(isset($_GET['s'])) {

session_id($_GET['s']);
session_start();

    require_once 'admin/class/user.php';

    $u = new User();

    //Check for user logged in

    if($u->islogged() == FALSE) {

      header("location: index.php");

   exit();

    code continue ..... 
 }

because am not logged in server redirect me to the index.php

this is swfupload debugger window output

 SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
 SWF DEBUG: 
 SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.jpg
 SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
 SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
 SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
 SWF DEBUG: StartUpload: First file in queue
 SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
 SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to /upload-file.php?s='189477fcfa1ec7f630e70a09e1e84cae' for File ID:  SWFUpload_0_0
 SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
 SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 317793. Total: 317793
 SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 302.
 SWF DEBUG: Event: uploadComplete : Upload cycle complete.
 SWF DEBUG: StartUpload: First file in queue
 SWF DEBUG: StartUpload(): No files found in the queue.


Try this in your swfupload js:

  var swf;
  window.onload = function () {
   swf = new SWFUpload({
    // Backend Settings
    post_params: {"PHPSESSID": "<?php echo session_id(); ?>"}
...
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号