facebook画布会话问题在ie [英] facebook canvas session problems in ie
本文介绍了facebook画布会话问题在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屋!
查看全文