Why the_excerpt display full conent in wordpress

Question:

When i use the_excerpt() to show the excerpt of post, however, it displays full content of post, why? and how to solve?

Answer:

The reason is that the excerpt of post is empty, so if we use the_excerpt(), it will display full content.

To solve this problem we can do like this:

<?php

if(has_excerpt()){
    the_excerpt();
 }

?>

,