0

when uploading the project to cpanel I got an error in the index.PHP

i'm using php>=5.6.4 and laravel 5.3

this error

Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /home/hamada11/public_html/madeineuromed.com/public_html/index.php on line 50.

in this line

$kernel = $app->make(Illuminate/Contracts/Http/Kernel::class);
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Your PHP version is less than version 5.5. This feature was added in version 5.5 and is described in the migration guide.

"It is possible to use ClassName::class to get a fully qualified name of class ClassName."

I'd suggest seeing if your hosting company can upgrade PHP for you. Otherwise, for example if you simply "fix" this by coding around it, you're likely to encounter a number of other (similar) errors.

Kevin_Kinsey
  • 2,285
  • 1
  • 22
  • 23