facebook画布会话问题在ie [英] facebook canvas session problems in ie

查看:123
本文介绍了facebook画布会话问题在ie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Facebook画布方法构建了一个应用程序。这在Mozilla中工作,但不在IE中。问题是我使用了PHP会话的面包屑功能。在IE中,会话不被记住,每次都会覆盖面包屑数组,而不是附加到数组。

  session_start(); 

//获取当前所选类别并添加到breadcumbs数组
if(isset($ _ GET ['cat_parent_id'])){
$ cat_parent_id = $ _GET ['cat_parent_id' ]。
$ cat_name = $ _GET ['cat_name'];
if($ cat_parent_id == 0){
$ _SESSION ['breadcrumbs'] ='';
} else {
//如果已选择的类别已经在面包屑数组中,则在该类别之后删除面包屑
$ position = array_search($ cat_parent_id,array_keys($ _ SESSION ['breadcrumbs']));
//如果找到一个位置,拼接数组。
if($ position!== FALSE){
// if($ position == 0){$ position = 1; }
array_splice($ _ SESSION ['breadcrumbs'],($ position + 1));
} else {
$ _SESSION ['breadcrumbs'] [$ cat_parent_id] = $ cat_name;
}
}
} else {
$ cat_parent_id = 0;
$ cat_name ='';
$ _SESSION ['breadcrumbs'] ='';
}

任何人都可以帮助?

解决方案

<?php标题(p3p:CP = \\所有DSP COR PSA PSDA我们的或不是UNI COM NAV \); ?>
由Moguzalip作品回答。


I have built an app using the facebook canvas method. This works in Mozilla but not in IE. The problem is with a breadcrumbs feature I have using PHP sessions. In IE the session is not remembered and the breadcrumb array is overwritten each time instead of appending to the array.

session_start();

//get current selected category and add to breadcumbs array
if (isset($_GET['cat_parent_id'])){
    $cat_parent_id = $_GET['cat_parent_id'];
    $cat_name = $_GET['cat_name'];
    if ($cat_parent_id == 0){
        $_SESSION['breadcrumbs'] = '';
    } else {
        //if selected category already in breadcrumb array, remove breadcrumbs after that category
        $position = array_search($cat_parent_id, array_keys($_SESSION['breadcrumbs']));
        // If a position is found, splice the array.
        if ($position !== FALSE) {
            //if ($position == 0){ $position = 1; }
            array_splice($_SESSION['breadcrumbs'], ($position + 1));
        } else {
            $_SESSION['breadcrumbs'][$cat_parent_id] = $cat_name;
        }
    }
} else {
    $cat_parent_id = 0;
    $cat_name = '';
    $_SESSION['breadcrumbs'] = '';
}

Can anyone help?

解决方案

<?php header("p3p: CP=\"ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV\"");?> as answered by Moguzalip works.

这篇关于facebook画布会话问题在ie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆