I've a problem with this code:
<meta property="og:url" content="<?= echo 'http://' .$_SERVER['SERVER_NAME']. '/' .$_SERVER['PHP_SELF']; ?>" />
ERROR:
Parse error: syntax error, unexpected 'echo' (T_ECHO)
please help
I've a problem with this code:
<meta property="og:url" content="<?= echo 'http://' .$_SERVER['SERVER_NAME']. '/' .$_SERVER['PHP_SELF']; ?>" />
ERROR:
Parse error: syntax error, unexpected 'echo' (T_ECHO)
please help
With <?=
this =
means its already going to echo
anything inside of the tags.
You can either remove the =
or remove the echo
So it should either look like this:
<meta property="og:url" content="<?= 'http://' .$_SERVER['SERVER_NAME']. '/' .$_SERVER['PHP_SELF']; ?>" />
or like this:
<meta property="og:url" content="<? echo 'http://' .$_SERVER['SERVER_NAME']. '/' .$_SERVER['PHP_SELF']; ?>"