-2

An uncaught Exception was encountered Type: ParseError Message: syntax error, unexpected end of file Filename: C:\xampp\htdocs\clinic-master\application\views\login_view.php Line Number: 62 Backtrace: File: C:\xampp\htdocs\clinic-master\application\controllers\Login.php Line: 18 Function: view File: C:\xampp\htdocs\clinic-master\index.php Line: 315 Function: require_once

I have error in view codeigniter, when i running in linux work and can run, but when i run in windows have error like that

Below is the my login_view :

    <!DOCTYPE html>
<html>
<head>
<meta name="keyword" content="">
<link rel="shortcut icon" href="<?php echo base_url(); ?>img/logo-icon.png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Q-Clinic</title>

<link href="<?php echo base_url(); ?>css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>css/bootstrap-reset.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href="<?php echo base_url(); ?>css/style.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>css/style-responsive.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>js/sweetalert2.css">
<script src="<?php echo base_url(); ?>js/sweetalert2.min.js"></script>
<?php 
if ($this->session->flashdata('salah')) { ?>
<script>
    swal({
        title: "Gagal",
        text: "<?php echo $this->session->flashdata('salah'); ?>",
        timer: 3000,
        showConfirmButton: false,
        type: 'error'
    });
</script>
<? } ?>    
</head>

<body class="login-body">
    <div class="container">
        <br><br><br>    
        <div align="center">
            <img src="<?php echo base_url(); ?>img/logo.png">            
        </div>

        <form class="form-signin" action="<?php echo base_url('login/cek_login'); ?>" name="login" method="post">
            <h2 class="form-signin-heading">Masukkan User & Password :</h2>
                <div class="login-wrap">            
                    <input id="username" type="text" class="form-control" name="username" placeholder="Username Anda" autofocus required>
                    <input type="password" class="form-control" placeholder="Password Anda" name="password"  required>
                    <button class="btn btn-lg btn-login btn-block" type="submit">Login</button>
               </div>            
        </form>

        <?php 
        if ($this->session->flashdata('notification')) { 
        ?>
            <div class="form-body">
                <div class="alert alert-block alert-success fade in" align="center">
                    <?php echo $this->session->flashdata('notification'); ?>
               </div>               
            </div>
        <?php 
        } 
        ?>       
    </div>

    <script src="<?php echo base_url() ?>js/jquery.js"></script>
    <script src="<?php echo base_url() ?>js/bootstrap.min.js"></script>
</body>
</html>
Pradeep
  • 9,667
  • 13
  • 27
  • 34
Ricky Lhein
  • 15
  • 1
  • 5

1 Answers1

6

Hope this will help you :

After the </script> tag

Replace this

<? } ?>     

with this :

<?php } ?>  

Should be like this :

<script>
    swal({
        title: "Gagal",
        text: "<?php echo $this->session->flashdata('salah'); ?>",
        timer: 3000,
        showConfirmButton: false,
        type: 'error'
    });
</script>
<?php } ?>  
Pradeep
  • 9,667
  • 13
  • 27
  • 34