Помощь по скриптам | ошибка
ребята помогите
вот ошибка:
вот код:
вот ошибка:
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in Z:\home\test2.ru\www\includes\init.php on line 19
вот код:
register_shutdown_function(function() {
125435825 , register_shutdown_function(function() ) {
DELETED
3 февраля 2016, в 18:27
Delete
RUS , не помогло может скинуть целий init
DELETED
3 февраля 2016, в 20:13
Delete
125435825 (03.02.2016 в 20:03)
RUS , не помогло может скинуть целий init
RUS , не помогло может скинуть целий init
Странно видеть функция в функции
И ты закрыть не забыл?
ultral , чо закрить?
DELETED
3 февраля 2016, в 20:37
Delete
125435825 (03.02.2016 в 20:33)
ultral , чо закрить?
ultral , чо закрить?
}
ultral (03.02.2016 в 20:13)
125435825 (03.02.2016 в 20:03)
RUS , не помогло может скинуть целий init
Странно видеть функция в функции
И ты закрыть не забыл?
125435825 (03.02.2016 в 20:03)
RUS , не помогло может скинуть целий init
Странно видеть функция в функции
И ты закрыть не забыл?
Для WAP может и странно
ultral (03.02.2016 в 20:13)
125435825 (03.02.2016 в 20:03)
RUS , не помогло может скинуть целий init
Странно видеть функция в функции
И ты закрыть не забыл?
скопипиздил, ничего странного.
125435825 (03.02.2016 в 20:03)
RUS , не помогло может скинуть целий init
Странно видеть функция в функции
И ты закрыть не забыл?
ultral ,
вот целий код:
[q]<?php
// Защита от двойного инита
if(defined('INIT')) {
return;
}
// define('SN_DEBUG_LOG', true);
// Замеряем начальные параметры
define('SN_TIME_MICRO', microtime(true));
define('SN_MEM_START', memory_get_usage());
define('SN_DEBUG_PDUMP_CALLER', false);
version_compare(PHP_VERSION, '5.3.2') < 0 ? die('FATAL ERROR: SuperNova REQUIRE PHP version > 5.3.2') : false;
// Бенчмарк
register_shutdown_function(function()) {
if(defined('IN_AJAX')) {
return;
}
global $user;
global $locale_cache_statistic;
print('<hr><div class="benchmark">Benchmark ' . (microtime(true) - SN_TIME_MICRO) . 's, memory: ' . number_format(memory_get_usage() - SN_MEM_START) .
(!empty($locale_cache_statistic['misses']) ? ', LOCALE MISSED' : '') .
(class_exists('classSupernova') && is_object(classSupernova::$db) ? ', DB time: ' . classSupernova::$db->time_mysql_total . 'ms' : '') .
'</div>');
if($user['authlevel'] >= 2 && file_exists(SN_ROOT_PHYSICAL . 'badqrys.txt') && @filesize(SN_ROOT_PHYSICAL . 'badqrys.txt') > 0) {
echo '<a href="badqrys.txt" target="_blank" style="color:red">', 'HACK ALERT!', '</a>';
}
if(!empty($locale_cache_statistic['misses'])) {
print('<!--');
pdump($locale_cache_statistic);
print('-->');
}
});
define('INIT', true);
!defined('INSIDE') ? define('INSIDE', true) : false;
!defined('INSTALL') ? define('INSTALL', false) : false;
!defined('IN_PHPBB') ? define('IN_PHPBB', true) : false;
global $phpEx, $sn_root_physical, $phpbb_root_path; // Это нужно для работы PTL
define('SN_TIME_NOW', intval(SN_TIME_MICRO));
define('SN_TIME_ZONE_OFFSET', date('Z'));
define('FMT_DATE_TIME_SQL', 'Y-m-d H:i:s');
define('SN_TIME_SQL', date(FMT_DATE_TIME_SQL, SN_TIME_NOW));
define('SN_TIME_NOW_GMT_STRING', gmdate(DATE_ATOM, SN_TIME_NOW));
if(strpos(strtolower($_SERVER['SERVER_NAME']), 'google.') !== false) {
define('SN_GOOGLE', true);
}
// Эти три строки должны быть В ЭТОМ ФАЙЛЕ, ПО ЭТОМУ ПУТИ и ПЕРЕД ЭТИМ ИНКЛЮДОМ!!!
$sn_root_physical = str_replace('\\', '/', __FILE__);
$sn_root_physical = str_replace('includes/init.php', '', $sn_root_physical);
define('SN_ROOT_PHYSICAL', $sn_root_physical);
// define('SN_ROOT_PHYSICAL_STR_LEN', mb_strlen($sn_root_physical));
define('SN_ROOT_PHYSICAL_STR_LEN', strlen($sn_root_physical));
$phpbb_root_path = SN_ROOT_PHYSICAL; // Это нужно для работы PTL
$sn_root_relative = str_replace('\\', '/', getcwd());
$sn_root_relative .= $sn_root_relative[strlen($sn_root_relative) - 1] == '/' ? '' : '/';
$sn_root_relative = str_replace(SN_ROOT_PHYSICAL, '', $sn_root_relative);
$sn_root_relative .= basename($_SERVER['SCRIPT_NAME']);
$sn_root_relative = str_replace($sn_root_relative, '', $_SERVER['SCRIPT_NAME']);
define('SN_ROOT_RELATIVE', $sn_root_relative);
define('SN_ROOT_VIRTUAL' , 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . SN_ROOT_RELATIVE);
define('SN_ROOT_VIRTUAL_PARENT' , str_replace('//google.', '//', SN_ROOT_VIRTUAL));
$phpEx = strpos($phpEx = substr(strrchr(__FILE__, '.'), 1), '/') === false ? $phpEx : '';
define('PHP_EX', $phpEx); // PHP extension on this server
define('DOT_PHP_EX', '.' . PHP_EX); // PHP extension on this server
require_once('constants.php');
require_once('classes/supernova.php');
classSupernova::init_0_prepare();
//classSupernova::init_1_constants();
classSupernova::init_3_load_config_file();
header('Content-type: text/html; charset=utf-8');
ob_start();
ini_set('error_reporting', E_ALL ^ E_NOTICE);
// TODO - Разобраться с порядком подключени и зависимостями объектов
require_once('classes/core_classes.php');
// required for db.php
// Initializing global 'debug' object
require_once(SN_ROOT_PHYSICAL . "includes/debug.class" . DOT_PHP_EX);
global $debug;
$debug = new debug();
classSupernova::debug_set_handler($debug);
require_once(SN_ROOT_PHYSICAL . "includes/db" . DOT_PHP_EX);
require_once('classes/db_mysql_v4.php');
require_once('classes/db_mysql_v5.php');
require_once('classes/db_mysql.php');
classSupernova::init_main_db(new db_mysql());
require_once('classes/cache.php');
require_once('classes/locale.php');
require_once('classes/template.php');
require_once('classes/functions_template.php');
require_once('classes/skin.php');
require_once('classes/module.php');
require_once('classes/playerTimeDiff.php');
require_once('classes/RequestInfo.php');
require_once('classes/PlayerToAccountTranslate.php');
require_once('classes/Confirmation.php');
require_once('classes/Account.php');
require_once('classes/core_auth.php');
// require_once('auth_provider.php');
require_once('classes/auth_abstract.php');
require_once('classes/auth_local.php');
require_once('classes/sn_module_payment.php');
require_once('classes/user_options.php');
require_once(SN_ROOT_PHYSICAL . "includes/init/init_functions" . DOT_PHP_EX);
/**
* @var classConfig $config
* @var classSupernova $supernova
*/
global $supernova, $sn_cache, $config, $auth;
classSupernova::init_global_objects();
// Отладка
// define('BE_DEBUG', true); // Отладка боевого движка
classSupernova::init_debug_state();
require_once(SN_ROOT_PHYSICAL . "includes/vars" . DOT_PHP_EX);
require_once(SN_ROOT_PHYSICAL . "includes/general" . DOT_PHP_EX);
init_update($config);
// Initializing constants
$sn_page_name_original = isset($_GET['page'])
? trim(strip_tags($_GET['page']))
: str_replace(DOT_PHP_EX, '', str_replace(SN_ROOT_RELATIVE, '', str_replace('\\', '/', $_SERVER['SCRIPT_NAME'])));
define('INITIAL_PAGE', $sn_page_name_original);
define('SN_COOKIE' , ($config->COOKIE_NAME ? $config->COOKIE_NAME : 'SuperNova')
вот целий код:
[q]<?php
// Защита от двойного инита
if(defined('INIT')) {
return;
}
// define('SN_DEBUG_LOG', true);
// Замеряем начальные параметры
define('SN_TIME_MICRO', microtime(true));
define('SN_MEM_START', memory_get_usage());
define('SN_DEBUG_PDUMP_CALLER', false);
version_compare(PHP_VERSION, '5.3.2') < 0 ? die('FATAL ERROR: SuperNova REQUIRE PHP version > 5.3.2') : false;
// Бенчмарк
register_shutdown_function(function()) {
if(defined('IN_AJAX')) {
return;
}
global $user;
global $locale_cache_statistic;
print('<hr><div class="benchmark">Benchmark ' . (microtime(true) - SN_TIME_MICRO) . 's, memory: ' . number_format(memory_get_usage() - SN_MEM_START) .
(!empty($locale_cache_statistic['misses']) ? ', LOCALE MISSED' : '') .
(class_exists('classSupernova') && is_object(classSupernova::$db) ? ', DB time: ' . classSupernova::$db->time_mysql_total . 'ms' : '') .
'</div>');
if($user['authlevel'] >= 2 && file_exists(SN_ROOT_PHYSICAL . 'badqrys.txt') && @filesize(SN_ROOT_PHYSICAL . 'badqrys.txt') > 0) {
echo '<a href="badqrys.txt" target="_blank" style="color:red">', 'HACK ALERT!', '</a>';
}
if(!empty($locale_cache_statistic['misses'])) {
print('<!--');
pdump($locale_cache_statistic);
print('-->');
}
});
define('INIT', true);
!defined('INSIDE') ? define('INSIDE', true) : false;
!defined('INSTALL') ? define('INSTALL', false) : false;
!defined('IN_PHPBB') ? define('IN_PHPBB', true) : false;
global $phpEx, $sn_root_physical, $phpbb_root_path; // Это нужно для работы PTL
define('SN_TIME_NOW', intval(SN_TIME_MICRO));
define('SN_TIME_ZONE_OFFSET', date('Z'));
define('FMT_DATE_TIME_SQL', 'Y-m-d H:i:s');
define('SN_TIME_SQL', date(FMT_DATE_TIME_SQL, SN_TIME_NOW));
define('SN_TIME_NOW_GMT_STRING', gmdate(DATE_ATOM, SN_TIME_NOW));
if(strpos(strtolower($_SERVER['SERVER_NAME']), 'google.') !== false) {
define('SN_GOOGLE', true);
}
// Эти три строки должны быть В ЭТОМ ФАЙЛЕ, ПО ЭТОМУ ПУТИ и ПЕРЕД ЭТИМ ИНКЛЮДОМ!!!
$sn_root_physical = str_replace('\\', '/', __FILE__);
$sn_root_physical = str_replace('includes/init.php', '', $sn_root_physical);
define('SN_ROOT_PHYSICAL', $sn_root_physical);
// define('SN_ROOT_PHYSICAL_STR_LEN', mb_strlen($sn_root_physical));
define('SN_ROOT_PHYSICAL_STR_LEN', strlen($sn_root_physical));
$phpbb_root_path = SN_ROOT_PHYSICAL; // Это нужно для работы PTL
$sn_root_relative = str_replace('\\', '/', getcwd());
$sn_root_relative .= $sn_root_relative[strlen($sn_root_relative) - 1] == '/' ? '' : '/';
$sn_root_relative = str_replace(SN_ROOT_PHYSICAL, '', $sn_root_relative);
$sn_root_relative .= basename($_SERVER['SCRIPT_NAME']);
$sn_root_relative = str_replace($sn_root_relative, '', $_SERVER['SCRIPT_NAME']);
define('SN_ROOT_RELATIVE', $sn_root_relative);
define('SN_ROOT_VIRTUAL' , 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . SN_ROOT_RELATIVE);
define('SN_ROOT_VIRTUAL_PARENT' , str_replace('//google.', '//', SN_ROOT_VIRTUAL));
$phpEx = strpos($phpEx = substr(strrchr(__FILE__, '.'), 1), '/') === false ? $phpEx : '';
define('PHP_EX', $phpEx); // PHP extension on this server
define('DOT_PHP_EX', '.' . PHP_EX); // PHP extension on this server
require_once('constants.php');
require_once('classes/supernova.php');
classSupernova::init_0_prepare();
//classSupernova::init_1_constants();
classSupernova::init_3_load_config_file();
header('Content-type: text/html; charset=utf-8');
ob_start();
ini_set('error_reporting', E_ALL ^ E_NOTICE);
// TODO - Разобраться с порядком подключени и зависимостями объектов
require_once('classes/core_classes.php');
// required for db.php
// Initializing global 'debug' object
require_once(SN_ROOT_PHYSICAL . "includes/debug.class" . DOT_PHP_EX);
global $debug;
$debug = new debug();
classSupernova::debug_set_handler($debug);
require_once(SN_ROOT_PHYSICAL . "includes/db" . DOT_PHP_EX);
require_once('classes/db_mysql_v4.php');
require_once('classes/db_mysql_v5.php');
require_once('classes/db_mysql.php');
classSupernova::init_main_db(new db_mysql());
require_once('classes/cache.php');
require_once('classes/locale.php');
require_once('classes/template.php');
require_once('classes/functions_template.php');
require_once('classes/skin.php');
require_once('classes/module.php');
require_once('classes/playerTimeDiff.php');
require_once('classes/RequestInfo.php');
require_once('classes/PlayerToAccountTranslate.php');
require_once('classes/Confirmation.php');
require_once('classes/Account.php');
require_once('classes/core_auth.php');
// require_once('auth_provider.php');
require_once('classes/auth_abstract.php');
require_once('classes/auth_local.php');
require_once('classes/sn_module_payment.php');
require_once('classes/user_options.php');
require_once(SN_ROOT_PHYSICAL . "includes/init/init_functions" . DOT_PHP_EX);
/**
* @var classConfig $config
* @var classSupernova $supernova
*/
global $supernova, $sn_cache, $config, $auth;
classSupernova::init_global_objects();
// Отладка
// define('BE_DEBUG', true); // Отладка боевого движка
classSupernova::init_debug_state();
require_once(SN_ROOT_PHYSICAL . "includes/vars" . DOT_PHP_EX);
require_once(SN_ROOT_PHYSICAL . "includes/general" . DOT_PHP_EX);
init_update($config);
// Initializing constants
$sn_page_name_original = isset($_GET['page'])
? trim(strip_tags($_GET['page']))
: str_replace(DOT_PHP_EX, '', str_replace(SN_ROOT_RELATIVE, '', str_replace('\\', '/', $_SERVER['SCRIPT_NAME'])));
define('INITIAL_PAGE', $sn_page_name_original);
define('SN_COOKIE' , ($config->COOKIE_NAME ? $config->COOKIE_NAME : 'SuperNova')