I'm using uploadify, and i can't set sessions in my php files, my script looks like this:
$("#uploadify").uploadify({
'uploader' : '/extra/flash/uploadify.swf',
'script' : '/admin/uploads/artistsphotos',
'scriptData' : {'PHPSESSID' : '<?= session_id(); ?>'},
'cancelImg' : '/images/cancel.png',
'folder' : '/img/artists',
'queueID' : 'fileQueue',
'auto' : false,
'multi' : true,
'onComplete' : function(a, b, c, d, e){
},
'onAllComplete': function(event,data){
$bla = $('#art').find(':selected',this);
$fi = $bla.val();
$.ajax({
type: "POST",
url: "/admin/uploads/artistsphotosupload",
data: "artist="+$fi,
success: function(msg){
console.log(msg);
}
});
}
});
And in php if i try:
$_SESSION['name'] = 'something';
I can't access it in another file.and i have session_start(); activated
Any solutions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…