0
15.     // Check Session Login
16.      if(!isset($_SESSION['logged_in'])){
17.         redirect(site_url('auth/login'));
18.      }
19.   }
20.
21.    function index(){
22.       redirect(site_url('home/dashboard'));
23.    }

An uncaught Exception was encountered
Type: Error
Message: Call to undefined function redirect()
Line Number: 17

SayAz
  • 751
  • 1
  • 9
  • 16
  • The error is fairly obvious - your program doesn't contain a function called "redirect". Where do you believe this function is coming from? – ADyson Jun 10 '20 at 08:35
  • because before I upload to hosting it works normally, when I upload an error occurs as follows – Imam Muharom Jun 10 '20 at 08:39
  • @ImamMuharom I would guess you either forgot to upload part of the project (or something it depends on), or put it in the wrong folder so it wasn't included properly. – ADyson Jun 10 '20 at 08:42
  • What is the CI version? – mickmackusa Jun 10 '20 at 08:45
  • @ADyson whereas at the time of uploading the project, I made it into a zip file and then extracted on the hosting :D – Imam Muharom Jun 10 '20 at 08:53
  • @mickmackusa my CI version 3.0.5 :D – Imam Muharom Jun 10 '20 at 08:54
  • @ImamMuharom ok but that doesn't prove anything by itself. The computer is not lying to you - that function is definitely missing. So please double-check everything you uploaded. In particular you should check the path that mickmackusa mentioned, which was helpful, so you know precisely where the function _should_ be located. – ADyson Jun 10 '20 at 08:58
  • @ADyson okay thanks for the advice, after I opened the project, the file 'auth/login' it was already there but the error message remained like that :D hehee – Imam Muharom Jun 10 '20 at 09:13
  • I can't quite tell if you're saying it's fixed or not – ADyson Jun 10 '20 at 09:14
  • This page must not be reopened in its current state because it would need to be instantly reclosed as `Off-topic: Cannot Reproduce`. – mickmackusa Jun 10 '20 at 09:16
  • 1
    @Imam where is this being called? In a Controller method? View? Model? – mickmackusa Jun 10 '20 at 09:28

0 Answers0