error 500 on my code

i’m working on an event calendar and i am running into a 500 error on my server. upon checking my apache error log, i get this error string

PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\\Apache\\htdocs\\events\\config.php on line 12
the following is line 12 from my code [php]$calendar_url = "http://<? echo $_SERVER['SERVER_NAME'].$path; ?>";[/php] any help would be appreciated thanks

well after almost 12 hours of looking at this code i found my solution.
I needed to change line 12 from
[php]$calendar_url = “http://<? echo $_SERVER['SERVER_NAME'].$path; ?>”;[/php]
to read like this
[php]$calendar_url = “http://{$_SERVER[‘SERVER_NAME’]}.$path;”;[/php]
now it works with now problem.

Sponsor our Newsletter | Privacy Policy | Terms of Service