22.06.2015, 07:59
I get a VPS and i install apache and configure that.Now when i enter ip adress in my browser i can see index.php source code.How to fix that?
<?php and ?>
<?php /** * Copyright © 2013-2014 "Nate 'L0", * PHP Script for Game Server management over web interface. * * This file is part of XISS Game Panel. * * XISS Game Panel is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * XISS Game Panel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with XISS Game Panel. If not, see <http://www.gnu.org/licenses/>. */ /** * Index file * * Main entry point. */ /** * For Statistics class */ $starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0]; $memoryload = memory_get_usage(); /** * Set entry point for router */ define("_BASE_", true); /** * Set root directory for files */ define('_ROOT_', __DIR__ .'/'); /** * Start Session */ if (function_exists('session_start')) session_start(); /** * Load router */ require_once 'core/router.php';
Xiss game panel index page.
Code:
<?php /** * Copyright © 2013-2014 "Nate 'L0", * PHP Script for Game Server management over web interface. * * This file is part of XISS Game Panel. * * XISS Game Panel is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * XISS Game Panel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with XISS Game Panel. If not, see <http://www.gnu.org/licenses/>. */ /** * Index file * * Main entry point. */ /** * For Statistics class */ $starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0]; $memoryload = memory_get_usage(); /** * Set entry point for router */ define("_BASE_", true); /** * Set root directory for files */ define('_ROOT_', __DIR__ .'/'); /** * Start Session */ if (function_exists('session_start')) session_start(); /** * Load router */ require_once 'core/router.php'; |
<?php
/**
* Copyright © 2013-2014 "Nate 'L0",
* PHP Script for Game Server management over web interface.
*
* This file is part of XISS Game Panel.
*
* XISS Game Panel is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* XISS Game Panel is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with XISS Game Panel. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Index file
*
* Main entry point.
*/
/**
* For Statistics class
*/
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
$memoryload = memory_get_usage();
/**
* Set entry point for router
*/
define("_BASE_", true);
/**
* Set root directory for files
*/
define('_ROOT_', __DIR__ .'/');
/**
* Start Session
*/
if (function_exists('session_start'))
session_start();
/**
* Load router
*/
require_once 'core/router.php';
/* See, this thingie down here is what you were missing. */
?>
If you later include more PHP code that modifies header values, you will get nasty warnings about "headers already sent".
|