Open parfenovn opened 9 years ago
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/u466736518/public_html/core/init.php on line 25
guys help please.
init.php code
<?php /**
Created by Chris on 9/29/2014 3:58 PM. */ session_start();
$GLOBALS['config'] = array( 'mysql' => array( 'host' => 'mysql.hostinger.ru', 'username' => 'u466736518_fles', 'password' => '643350np', 'db' => 'u466736518_fles' ), 'remember' => array( 'cookie_name' => 'hash', 'cookie_expiry' => 604800 ), 'sessions' => array( 'session_name' => 'user', 'token_name' => 'token' ) );
spl_autoload_register(function($class) { --------line 25 require_once './classes/' . $class . '.php'; });
require_once './functions/sanitize.php';
if(Cookie::exists(Config::get('remember/cookie_name')) && !Session::exists(Config::get('sessions/session_name'))) { $hash = Cookie::get(Config::get('remember/cookie_name')); $hashCheck = DB::getInstance()->get('users_session', array('hash', '=', $hash));
if($hashCheck->count()) { $user = new User($hashCheck->first()->user_id); $user->login(); } }
Probably you're using older version of PHP. Probably fixed in PR: #94
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/u466736518/public_html/core/init.php on line 25
guys help please.
init.php code
<?php /**
Created by Chris on 9/29/2014 3:58 PM. */ session_start();
$GLOBALS['config'] = array( 'mysql' => array( 'host' => 'mysql.hostinger.ru', 'username' => 'u466736518_fles', 'password' => '643350np', 'db' => 'u466736518_fles' ), 'remember' => array( 'cookie_name' => 'hash', 'cookie_expiry' => 604800 ), 'sessions' => array( 'session_name' => 'user', 'token_name' => 'token' ) );
spl_autoload_register(function($class) { --------line 25 require_once './classes/' . $class . '.php'; });
require_once './functions/sanitize.php';
if(Cookie::exists(Config::get('remember/cookie_name')) && !Session::exists(Config::get('sessions/session_name'))) { $hash = Cookie::get(Config::get('remember/cookie_name')); $hashCheck = DB::getInstance()->get('users_session', array('hash', '=', $hash));
if($hashCheck->count()) { $user = new User($hashCheck->first()->user_id); $user->login(); } }