English 中文(简体)
瑟文,jQuery.ajax(电话)
原标题:Symfony, jQuery.ajax() call, session variables lost

我正在用表1.3书写一个网络。 我对本届会议的变数表示质疑,因为我通过“ j”号呼吁采取行动。 情况如下:

  1. An action sets the session variable like this:

    $this->getUser()->setAttribute( uploaded-files , $uploadedFiles);
    
  2. 之后,当行动要求观察部分时,所产生的超文本页面载有以下呼吁:

    $.ajax({
      type: "POST",
      url:  <?php echo url_for("content/merge"); ?> ,
      cache: false,
      success: mergingCompleteCallback
    });
    
  3. 我点击触发上述亚克斯呼吁的纽顿。 该呼吁采用了相应的行动方法,但当我宣读上载文件会议的内容变数时,便空洞。

    我也检查了,会议是否在给定变量的网页打电话和读作变量的网页(阿加西语)和会议前的斜线之间保持相同。 我在网上搜寻几个小时,我无法找到解决办法。

问题回答

我有同样的问题,问题在于,我利用东道价值,以www.mydomain.com储存库,而我是在要求Ajax不要www

The solution is use the wildcard like host. Like .mydomain.com as your host to store session cookie on browser end.

有理由确保你们不是受害者?

你还可以把本届会议的价值观添加到呼吁中,这样,你就不必把它列入日本宇宙航空研究开发机构的呼吁中。 它是一个比喻的黑客,但会奏效。

Do you see the session variable in the dev bar? Maybe its caching, I ve had a caching problem like this before.





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签