찾다

 >  Q&A  >  본문

로그인 시 페이지에 오류가 있습니다. 어떻게 해결하나요?

<?php
namespace appindexcontroller;
use appindexcontrollerBase;
class Index extends Base
{
public function index()
{
$this->isLogin(); // 사용자가 로그인했는지 확인
return $ this-> ;view->fetch();
}
}

星河4p星河4p2728일 전1345

모든 응답(4)나는 대답할 것이다

  • 糊涂斌

    糊涂斌2017-08-30 11:25:53

    $this->isLogin();

    isLogin() 이 메소드는 클래스에 없습니다. 현재 개체 예:

    class Index extends Base
    {
       public function index()
       {
           $this->isLogin();   //判断用户是否登录
           return $this->view->fetch();
       }
       public isLogin(){
           #code 判断用户是否登录
       }
    }


    회신하다
    0
  • 鸢尾花

    잘못된 답변

    鸢尾花 · 2018-01-03 18:57:03
  • ringa_lee

    ringa_lee2017-08-16 13:34:21

    그럼 isLogin() 메소드에 뭔가 문제가 있는 게 틀림없어요

    회신하다
    0
  • 星河4p

    星河4p2017-08-16 09:09:53

    다음 문장을 추가하면 페이지가 잘못되었습니다

    $this->isLogin() //사용자가 로그인했는지 확인

    회신하다
    0
  • 취소회신하다