Why is archive.php used for my page

An archive of a custom post type is displayed using archive-[posttype].php or archive.php if the first does not exist (see the Template Hierarchy for the full details). page-[posttype].php is only used if you create a “dummy” page to show a custom post type archive (before WordPress 3.1).

So in your case you should rename page-portfolio.php to archive-portfolio.php, and don’t include a header to indicate a page template name.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)