Magento 2.1.1 upgrade to magento 2.2

Magento 2.1.1 upgrade to mahento 2.2 . I installed php 7.1

now my php version is 7.1 and magento version is 2.1.1 there is a problem.

i changed php versio 7.0 but server doesnt change phpv , website running in 7.0 and mahnto 2.1.1.

I want to change php version first to 7.0 now in server. unable to di:compile . Please give me the solution