简体   繁体   English

服务器登录页面或注册页面上的代码在ignigner中出现问题

[英]on server login page or registration page occur problem in codeigniter

Some important problems face in Codeigniter which I found and at last found the solution maybe it helps you so I share it. 我在Codeigniter中发现了一些重要问题,最后发现该解决方案可能对您有所帮助,所以我与您分享。 - Sometimes in CodeIgniter face a problem of login page redirection to the login page again. -有时在CodeIgniter中遇到登录页面再次重定向到登录页面的问题。 - On registration form when you fill the form and submit then it shows a null problem which error: 3014 or some type of error. -在注册表中,当您填写表格并提交时,它会显示一个空问题,错误为:3014或某种类型的错误。 - Mostly the session not working. -大多数情况下,该会话无法正常工作。

What is the solution 解决办法是什么

  • there is lost of type solution and it depends on different scenarios. 丢失了类型解决方案,它取决于不同的方案。
  • sometimes at $this->session->set_userdata('logged_in', $session_data); 有时在$ this-> session-> set_userdata('logged_in',$ session_data); at this point don't give underscore on logged_in will help. 在这一点上不要在下划线上加下划线会有所帮助。
  • some times on application->config->config.php at $config['sess_cookie_name'] = 'ci_session'; 有时在$ config ['sess_cookie_name'] ='ci_session'的application-> config-> config.php上; removeing the underscore from ci_session will help. 从ci_session删除下划线将有所帮助。
  • And many other way to find your best solution. 还有许多其他方法来找到最佳解决方案。 And right now after facing a problem with my scenario and stucked for around 4 hours and searching lot's of pages and CodeIgniter form but didn't get any solution and then I realise maybe it's a version problem, mine was 3.1.3, so I updated it to 3.1.9. 在遇到我的方案问题并停留了大约4个小时并搜索了许多页面和CodeIgniter表单后,但没有得到任何解决方案,现在我意识到这可能是版本问题,我的是3.1.3,所以我更新了到3.1.9。 but the problem which I explain above which as same then after few more minute on spend on google but the problem was the same. 但是我在上面解释的问题还是在谷歌上花了几分钟之后才解决的,但问题是相同的。 Then suddenly one thing clicks on my mind and I applied that and boom all those problems solved. 然后突然一件事突然在我的脑海中震荡,我应用了它,繁荣解决了所有这些问题。

This is the solution which I applied on my case and it worked perfectly. 这是我在案件中应用的解决方案,并且效果很好。 I memorise one thing. 我记住一件事。 on .htaccess I route my non www site to www.example.com but on 在.htaccess上,我将非www网站路由到www.example.com,但在

config.php my base_url was example.com config.php我的base_url是example.com

and that is the problem wich occurs all those above problems on my website but when I change my 那就是所有上述问题都出现在我的网站上的问题,但是当我更改我的

example.com to www.example.com on base_url 从base_url的example.com到www.example.com

everything comes on normal. 一切正常。 Maybe it also helps you. 也许它也可以帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM