I have created the custom article type but its unique view will index

Here is my code:

function create_posttype () {

register_post_type ('movies',
// CPT Options
array (& # 39; public & # 39; => true,

& # 39; labels & # 39; => array (
& # 39; name & # 39; => __ (& # 39; Movies & # 39;),
& # 39; singular_name & # 39; => __ (& # 39; Movie & # 39;)
)
& # 39; has_archive & # 39; => true,
& # 39; rewrite & # 39; => array ('slug' => & # 39; movies & # 39;),
)
)
}

// Connect our function to the theme configuration

add_action (& # 39; init & # 39 ;, create_posttype & # 39;);

I have also created the archive-movies.php and single-movies.phpbut when I open the detail page of a message, it will index.php and display the list of blogs.