Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770
Форумы портала PHP.SU :: Версия для печати :: Выдает ошибку Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE)
Форумы портала PHP.SU » » Если скрипт не работает » Выдает ошибку Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE)

Страниц (1): [1]
 

1. gwizz - 09 Декабря, 2016 - 09:39:14 - перейти к сообщению
Помогите на одном сервере все было норм при переносе вылетела ошибка Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE)кусок кода

<?$custom_query = new WP_Query( array( 'post_type' => 'post','posts_per_page'=>'1' ) );
if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); ?>
<a href="<?php the_permalink();?>" class="img"><img src="<?php echo (get_the_post_thumbnail($post->ID, 'post-thumba')) ?></a>
<h4><a href="<?php the_permalink();?>"><?php the_title(); ?></a></h4>
<!--noindex--><p><?php echo get_the_excerpt();?></p><!--/noindex-->
<span class="date"> <?php echo get_the_date();?> </span>
<?php endwhile; endif; ?>
2. Мелкий - 09 Декабря, 2016 - 10:30:16 - перейти к сообщению
gwizz пишет:
<?$custom_query

Пальцем в небо: у вас на одной машинке short_open_tags включен, на другой выключен.

 

Powered by ExBB FM 1.0 RC1