Always inside frame |
I am using CI4. I make a simple view, however, it is always under a frame.
http://www.myohomall.com/login After I login, the url is still the same. I find that all contents are under a frame. Do I set config wrongly? Also, my url can be accessed only by incognito mode of Chrome, but it is normal in Edge. How can I fix it? (06-15-2023, 04:00 AM)JustJohnQ Wrote: Can you show the code of the view? Inside Controller User.php public function login() { helper('form'); $data['title'] = "Login"; $session = session(); // Check whether the form is submitted // Normal loading the login page if (!$this->request->is('post')) { return view('login', $data); } // Check the submitted form else { $post = $this->request->getPost(['loginid', 'password']); if (! $this->validateData($post, [ 'loginid' => 'required|max_length[255]|min_length[5]', 'password' => 'required|max_length[5000]|min_length[8]', ])) { $session->setFlashdata('msg', "Information is too short"); return view('login', $data); } $userModel = model(userModel::class); // $logModel = model(userModel::class); $loginid = $this->request->getVar('loginid'); $password = $this->request->getVar('password'); $validation = $userModel->where('loginid', $loginid)->first(); if ($validation) { $pass = $validation['password']; $auth = (md5($password) == $pass); // Login success if ($auth) { // Write log // $user->save(['']) // Set session $session_data = [ 'userid' => $validation['userid'], 'rolelevel' => $validation['rolelevel'], 'fullname' => $validation['fullname'], 'email' => $validation['email'], 'isLoggedIn' => TRUE ]; $session->set($session_data); // Redirect to main menu page return $this->main(); } else { $session->setFlashdata('msg', session('PASSWORDNOTMATCH')); } } else { $session->setFlashdata('msg', session('ALERT_LOGINFAILURE')); } return view('login', $data); } }
My guess is that your hosting party is putting it in a frame. Try it with a very simple html doc and call it from your controller. If this ends up in a frame too, I would contact the hosting provider if I were you.
(06-15-2023, 10:30 PM)JustJohnQ Wrote: My guess is that your hosting party is putting it in a frame. Try it with a very simple html doc and call it from your controller. If this ends up in a frame too, I would contact the hosting provider if I were you. I am using Synology NAS web station. It is normal for basic php website. But when I am newly using codeigniter, it shows strange. Or you may access http://keithhui.myds.me/mcs/public/login for my problem. Thanks.
|
Welcome Guest, Not a member yet? Register Sign In |