mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
77 lines
1.7 KiB
PHP
77 lines
1.7 KiB
PHP
<?php
|
|
|
|
/*
|
|
|
|
-
|
|
/ \
|
|
/ \
|
|
/ POCKET \
|
|
/ MINECRAFT PHP \
|
|
|\ @shoghicp /|
|
|
|. \ / .|
|
|
| .. \ / .. |
|
|
| .. | .. |
|
|
| .. | .. |
|
|
\ | /
|
|
\ | /
|
|
\ | /
|
|
\ | /
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
|
|
*/
|
|
|
|
|
|
require_once(dirname(__FILE__)."/config.php");
|
|
require_once("common/functions.php");
|
|
|
|
$errors = 0;
|
|
|
|
if(version_compare("5.3.3", PHP_VERSION) > 0){
|
|
console("[ERROR] Use PHP >= 5.3.3", true, true, 0);
|
|
++$errors;
|
|
}
|
|
|
|
if(version_compare("5.4.0", PHP_VERSION) > 0){
|
|
console("[NOTICE] Use PHP >= 5.4.0 to increase performance", true, true, 0);
|
|
define("HEX2BIN", false);
|
|
}else{
|
|
define("HEX2BIN", true);
|
|
}
|
|
|
|
if(php_sapi_name()!=="cli"){
|
|
console("[ERROR] Use PHP-CLI to execute the client or create your own", true, true, 0);
|
|
++$errors;
|
|
}
|
|
|
|
if(!extension_loaded("gmp")){
|
|
console("[NOTICE] Enable GMP extension to increase performance", true, true, 0);
|
|
define("GMPEXT", false);
|
|
}else{
|
|
define("GMPEXT", true);
|
|
}
|
|
|
|
if(!function_exists("gzinflate")){
|
|
console("[ERROR] Unable to find Zlib extension", true, true, 0);
|
|
++$errors;
|
|
}
|
|
|
|
if(!function_exists("socket_create")){
|
|
console("[ERROR] Unable to find Socket functions", true, true, 0);
|
|
++$errors;
|
|
}
|
|
|
|
if($errors > 0){
|
|
die();
|
|
}
|
|
|
|
require_once("classes/Utils.class.php");
|
|
require_once("classes/Socket.class.php");
|
|
require_once("classes/Packet.class.php");
|
|
require_once("classes/MinecraftInterface.class.php");
|
|
|
|
?>
|