-1

I was following a tutorial for push notification using firebase and tried to upload all files to 000webhost.com, but I'm getting the following error:

Parse error: syntax error, unexpected T_CONST in /home/a6748590/public_html/FirebasePush/send.php on line 4

I've tried to search many topics here about php syntax error with no success fixing my issue.

kleiser sarifo
  • 302
  • 2
  • 10

1 Answers1

0

Replace this part:

const DEFAULT_URL = 'https://simplifiedcoding.firebaseio.com/';

with:

define('DEFAULT_URL', 'https://simplifiedcoding.firebaseio.com/');

in your send.php file (line 4)

CarlosCarucce
  • 3,420
  • 1
  • 28
  • 51
  • now I'm getting Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/a6748590/public_html/FirebasePush/send.php on line 32 Parse error: syntax error, unexpected T_STRING in /home/a6748590/public_html/FirebasePush/send.php on line 32 – kleiser sarifo May 30 '16 at 20:16
  • @kleisersarifo my fault, remove the white space in the end of the first define argument. I will fix my answer – CarlosCarucce May 31 '16 at 11:42