duanpo1821 2016-07-15 09:52
浏览 18

会话未通过文件传递正确的值

I am going crazy and need some tips and help. Working with custom cms and php programming language. I am working on online site on server.

Problem is next:

Session start is ok, In functions.php I start session['lng'] and put _LNG constant in it and it's ok, passing alright.

When I call session['lng'] in my other files I always get the same language constant (en) but I am passing (hr) or (de)?? I checked 10 time if session is set somewhere else but it isn't.

How can I check where's the problem...I really don't know what to do next

  • 写回答

1条回答 默认 最新

  • dongyou2714 2016-07-15 09:53
    关注

    Did you place this at the start of other files before accessing session variables. It's required to access session vars.

    <?php
    session_start();
    
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用