Did you check other related threads aswell like Upgrade ubuntu 16.04 to 18.04 - DB Issue and tried that solution?
You shouldn’t be seeing code in your browser, php isn’t working and PHP 7.0 is not supported anymore, I would look at installing php 7.2 .
Also check logs/librenms.log for any handy output