Added a nice table for displaying currently available servers
This commit is contained in:
@ -54,6 +54,15 @@ $app->post('/create', function (Request $request, Response $response, $args) {
|
||||
fclose($scriptFile);
|
||||
chmod($scriptFilePath, 0755);
|
||||
|
||||
// save the current version to a text file - this will hopefully be temporary solution
|
||||
$versionFilePath = join('/', array($serverDir, 'current_version.txt'));
|
||||
$versionFile = fopen($versionFilePath, 'w');
|
||||
$versionContent = $params['serverVersion'];
|
||||
fwrite($versionFile, $versionContent);
|
||||
fclose($versionFile);
|
||||
chmod($versionFilePath, 0644);
|
||||
|
||||
// redirect the user back to the home page
|
||||
return $response
|
||||
->withHeader('Location', '/')
|
||||
->withStatus(302);
|
||||
|
Reference in New Issue
Block a user