遇到未捕获的异常类型:ParseError消息:语法错误,意外的文件结尾文件名:C: \examplep\htdocs\clinic-master\application\views\login_view.php行号:62回溯:文件:C:\examplep\htdocs\clinic-master\application\controllers\Login.php行:18功能:视图文件:C:\examplep\htdocs\clinic-master\index.php行:315函数:需要一次
我在视图codeigniter中有错误,当我在linux中运行时可以运行,但当我在windows中运行时有类似的错误
下面是我的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>
希望这将帮助您:
</script>
标签之后
更换此
<? } ?>
与此:
<?php } ?>
应该是这样的:
<script>
swal({
title: "Gagal",
text: "<?php echo $this->session->flashdata('salah'); ?>",
timer: 3000,
showConfirmButton: false,
type: 'error'
});
</script>
<?php } ?>