1

I'm using 000webhost.com and uploaded all of my coding in it. But then this error shows up when I try open up the website:

Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/a4350293/public_html/core/init.php on line 25

This is the line on init.php:

spl_autoload_register(function($class) {
require_once 'classes/' . $class . '.php';
});

Can anyone tell me where my error is? Can't seem to find it. Thanks, all help appreciated. This is the link to my website: http://educationexperts.host56.com/

2
  • Is your webhost running at least php 5.3? If not, I suggest finding a new host. Any web host that allows new sites to use less than php 5.3 should be condemned. Commented Oct 20, 2014 at 2:55
  • check the php version, because the closure needs php5.3+ Commented Oct 20, 2014 at 2:57

2 Answers 2

1

I had a quick look and it appears that "000webhost.com" runs PHP 5.2.

Reference

This is not good because PHP 5.2 is no longer supported. You must find a web host that supports a later version of PHP. Preferably 5.4 as 5.3 has also reached it's EOL (end of life).

Sign up to request clarification or add additional context in comments.

Comments

1

A quick look at the hosting providers features

http://www.000webhost.com/free-php-hosting

Supports only PHP 5 and like others commented earlier, you will need 5.3.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.