脚本宝典收集整理的这篇文章主要介绍了php – 是否可以要求登录OpenCart Information页面,而且只需要信息页面?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
if (isset($this->request->get['information_id']) && $this->request->get['information_id'] == '{ID}') { //If the information_id is PRovided and IT matches the ID you wish to protect if (!$this->customer->isLOGged()) { //If the customer is not logged in already,redirect them to the login page //Use $this->session->data['redirect'] to redirect them back to this page after logging in $this->session->data['redirect'] = $this->url->link('information/information','information_id=' . $this->request->get['information_id']); //Do the redirect $this->redirect($this->url->link('account/login','','SSL')); } }
我假设信息页面在上面的例子中没有使用SSL,如果是的话你需要修改它.
如果你对这应该去哪里感到困惑,请看看controller / account / account.PHP – 我从那里获取了这些代码,并为特定的信息页面修改了它.
以上是脚本宝典为你收集整理的php – 是否可以要求登录OpenCart Information页面,而且只需要信息页面?全部内容,希望文章能够帮你解决php – 是否可以要求登录OpenCart Information页面,而且只需要信息页面?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。