Directly opening php file
#6

Quote:
Originally Posted by CloW
View Post
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';
There is no ?> at the end. Be sure to add ?> to close the php source.

Here's how it should look like
PHP 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';
/* See, this thingie down here is what you were missing. */
?>
Reply


Messages In This Thread
Directly opening php file - by CloW - 22.06.2015, 07:59
Re: Directly opening php file - by Shetch - 22.06.2015, 08:00
Re: Directly opening php file - by CloW - 22.06.2015, 08:01
Re: Directly opening php file - by Shetch - 22.06.2015, 08:02
Re: Directly opening php file - by CloW - 22.06.2015, 08:05
Re: Directly opening php file - by Jstylezzz - 22.06.2015, 08:27
Re: Directly opening php file - by CloW - 22.06.2015, 08:34
Re: Directly opening php file - by Vince - 22.06.2015, 08:56
Re: Directly opening php file - by Mauzen - 22.06.2015, 11:17
Re: Directly opening php file - by GWMPT - 22.06.2015, 11:43
Re: Directly opening php file - by CloW - 22.06.2015, 16:21

Forum Jump:


Users browsing this thread: 1 Guest(s)