@WyPe

"Parse error: syntax error, unexpected end of file on line 79" Всмысле!?

Всмысле неожиданый конец файла? Чо ему не нравится, нормальный конец файла блин, уже все скобки перековырял...

<!DOCTYPE html>

<?php
require_once 'dbconfig.php';
?>

<head>
	<title>Gallary</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
	<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="css/magnific-popup.css" rel="stylesheet"> 
	<link href="css/templatemo_style.css" rel="stylesheet" type="text/css">	
</head>
<body style="background-color:white;">

		
		<div class="content-container" >
			<header>
			<!--<h1 class="center-text">Gallary at glance</h1>-->
			
		</header>
		
		<?php
	
	$stmt = $DB_con->prepare('SELECT id, name, description, price, image FROM products ORDER BY ID DESC');
	$stmt->execute();
	
	if($stmt->rowCount() > 0)
	{
		while($row=$stmt->fetch(PDO::FETCH_ASSOC))
		{
			extract($row);
			?>
		<div class="portfolio-group">
          <a class="portfolio-item" href="<?php echo $image['image']; ?>">
            <img src="<?php echo $image['image']; ?>" alt="image 1">
            <div class="detail">
              <h3><b><?php echo $price['price']; ?> MDL</b></h3>
              <p><?php echo $name['name']; ?></p>
              <span class="btn">View</span> 
            </div>
          </a>				
        </div>
<?php } ?>

			<div class="pagination">
				<ul class="nav">
					<li class="active">1</li>
					<li>2</li>
					<li>3</li>
				</ul>
			</div>
		</div>
	</div>	<!-- /.content-container -->	
		
	
	<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="js/modernizr.2.5.3.min.js"></script>
	<script type="text/javascript" src="js/jquery.magnific-popup.min.js"></script> 
	<script type="text/javascript" src="js/templatemo_script.js"></script>
	<script type="text/javascript">
		$(function () {
			$('.pagination li').click(changePage);
			$('.portfolio-item').magnificPopup({ 
				type: 'image',
				gallery:{
					enabled:true
				}
			});
		});
	</script>	
</body>
</html>
  • Вопрос задан
  • 290 просмотров
Решения вопроса 1
@jowee
Backend Developer
Не хватает закрывающейся фигурной скобки для блока if
Ответ написан
Пригласить эксперта
Ответы на вопрос 2
Sanes
@Sanes
В смысле синтаксическая ошибка на 79 строке.
Ответ написан
Uwe_Boll
@Uwe_Boll
Я Злой и Страшный Уве Болл в Разработке знаю Толк
пиши Так:
<?php if($stmt->rowCount() > 0) :?>
<?php while($row=$stmt->fetch(PDO::FETCH_ASSOC)): ?>
тут весь твой ХЕТЕМЕЭЛЬ
<?php endwhile:?>
<?php endif; ?>
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы