Hi,
Before doing upgrade, did you take backup of moodle folder, moodle data folder and moodle database? If not, please take a backup. Also please check your server has all the requirements to use Moodle 3.1.
To know more information about the issue, please enable debugging by adding following lines to config.php
@error_reporting(E_ALL | E_STRICT);
@ini_set('display_errors', '1');
$CFG->debug = (E_ALL | E_STRICT);
$CFG->debugdisplay = 1;