Codeigniter中的阿拉伯字符会话问题 [英] Session issue in codeigniter for arabic character

查看:54
本文介绍了Codeigniter中的阿拉伯字符会话问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是遇到有关会话的问题。我有一个英语和阿拉伯语多语言电子商务网站。如果使用阿拉伯语,则有人使用阿拉伯语名称,描述或此类字段可以成功注册。但是在登录期间,会话数据丢失了。

I am just stuck with a issue regarding session. I have a multilingual ecommerce site for english and arabic language. In case of arabic language when someone registers with a arabic name, description or such fields s/he can register successfully. But during login the session data being lost.

实际上,当将所有数据设置到会话数组中时,它会被存储,我通过打印该数组进行测试。但是,在经过有效身份验证之后,当用户重定向到索引页面或个人资料页面时,会话数组就会消失。整个阵列丢失了。和登录不起作用。这仅发生在数据上带有阿拉伯语字段的人。对于英语,它完全可以。

Actually when setting all the data into a session array its being stored and i tested it by printing the array. But after the valid authentication when user being redirected to index page or profile page then the session array disappears. The full array being lost. and login doesnt working. Its only happening for someone who has arabic fields on their data. for english its perfectly ok.

我已经从syatem / libraries目录中删除了session.php。然后,它仅在本地主机上工作,在服务器上,当订购或查看特定组织的项目时会产生问题。

I have removed the session.php from syatem/libraries directory. Then it works only on localhost, on server it creates problem when ordering or viewing items of a particular org.

任何建议都会被接受。

谢谢

推荐答案

非常感谢您对我们的答复...和我的问题已解决。

Thank u so much all of u for your reply.... and my issue has been solved.

很遗憾,我的会话表user_data字段排序规则不是utf8_unicode。这就是为什么数据重定向到主页时丢失的原因。由于它使用的是ci_session表。

Unfortunately my session table user_data field collation was not utf8_unicode. Thats why the data was being lost when it redirects to home page. Since it is using the ci_session table. Its working now nicely.

在发布我尝试使用本机会话的问题之前,请先更新系统/库中的Session.php文件...。但是还没有完美的解决方案。

Before posting the question i have tried using native session, updated the Session.php file on system/libraries....But haven't got the perfect solution.

但最终可以找出愚蠢的错误并解决问题。

But finally could have figured out the silly mistake and done with the issue.

欢呼对所有人....:D

Cheers to all....:D

谢谢

这篇关于Codeigniter中的阿拉伯字符会话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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