English 中文(简体)
Wordpress PHP: Unexpected$ End Error
原标题:Wordpress PHP: Unexpected $End Error
  • 时间:2012-05-17 17:54:27
  •  标签:
  • php
  • syntax

这是我第一次用快乐器做饭,也是我第一次使用购买力平价(不包括偶尔的服务器)。 也就是说,我没有PHP的任何东西,而且仅仅掌握了yn。

我试图创造一些定制的休息场所,一旦我去工作,我就照搬了《工作法典》,改变了身份证,并期望这项工作。 沉默可能吗? 不管怎么说,我拿到的是第203行的意外费用。

任何人都愿意告诉我,是什么原因? 提前感谢!

<!-- FEATURED LOOP -->
<div class="featured">
<?php $my_query = new WP_Query( category_name=featured&showposts=1 ); ?>
<?php if ( have_posts() ) : ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

        <?php do_atomic(  before_entry  ); // origin_before_entry ?>

        <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
            <?php do_atomic(  open_entry  ); // origin_open_entry ?>

            <?php
            if ( current_theme_supports(  get-the-image  ) ) {                              
                if ( is_sticky ( $post->ID ) ) {
                    get_the_image( array(  meta_key  =>  Thumbnail ,  size  =>  single-thumbnail ,  image_class  =>  featured  ) );
                } else {
                    get_the_image( array(  meta_key  =>  Thumbnail ,  size  =>  thumbnail ,  image_class  =>  featured  ) );
                }
            }
            ?>

            <div class="sticky-header">
                <?php echo apply_atomic_shortcode(  entry_title ,  [entry-title]  ); ?>
                <?php echo apply_atomic_shortcode(  byline ,  <div class="byline">  . __(  [entry-published] &middot; by [entry-author] &middot; in [entry-terms taxonomy="category" before=""] [entry-edit-link before=" &middot; "] ,  origin  ) .  </div>  ); ?>                 
            </div><!-- .sticky-header -->

            <div class="entry-summary">
                <?php the_excerpt(); ?>
                <?php wp_link_pages( array(  before  =>  <p class="page-links">  . __(  Pages: ,  origin  ),  after  =>  </p>  ) ); ?>
            </div><!-- .entry-summary -->

            <?php do_atomic(  close_entry  ); // origin_close_entry ?>
        </div><!-- .hentry -->

        <?php do_atomic(  after_entry  ); // origin_after_entry ?>

    <?php endwhile; ?>
    <?php wp_reset_postdata(); // reset the query ?>
<?php else : ?>
<!--END FEATURED LOOP-->    

<!-- SUBFEATURED LOOP -->
<div class="subfeatured">
<?php $my_query = new WP_Query( category_name=subfeatured&showposts=1 ); ?>
<?php if ( have_posts() ) : ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

        <?php do_atomic(  before_entry  ); // origin_before_entry ?>

        <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
            <?php do_atomic(  open_entry  ); // origin_open_entry ?>

            <?php
                if ( current_theme_supports(  get-the-image  ) ) {
                    if ( is_sticky ( $post->ID ) ) {
                        get_the_image( array(  meta_key  =>  Thumbnail ,  size  =>  single-thumbnail ,  image_class  =>  featured  ) );
                    } else {
                        get_the_image( array(  meta_key  =>  Thumbnail ,  size  =>  thumbnail ,  image_class  =>  featured  ) );
                    }
                }
            ?>

            <div class="sticky-header">
                <?php echo apply_atomic_shortcode(  entry_title ,  [entry-title]  ); ?>
                <?php echo apply_atomic_shortcode(  byline ,  <div class="byline">  . __(  [entry-published] &middot; by [entry-author] &middot; in [entry-terms taxonomy="category" before=""] [entry-edit-link before=" &middot; "] ,  origin  ) .  </div>  ); ?>
            </div><!-- .sticky-header -->

            <div class="entry-summary">
                <?php the_excerpt(); ?>
                <?php wp_link_pages( array(  before  =>  <p class="page-links">  . __(  Pages: ,  origin  ),  after  =>  </p>  ) ); ?>
            </div><!-- .entry-summary -->

            <?php do_atomic(  close_entry  ); // origin_close_entry ?>
        </div><!-- .hentry -->

        <?php do_atomic(  after_entry  ); // origin_after_entry ?>

    <?php endwhile; ?>  
    <?php wp_reset_postdata(); // reset the query ?>
<?php else : ?>         
<!--END SUBFEATURED LOOP-->
问题回答

The final line of php Code You have is:

   <?php else : ?>

您需要完成以下工作: 控制结构。 你没有这样的东西:

   <?php endif; ?>




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签