Parse Error Syntax Error Unexpected T_sl Eod
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the parse error syntax error unexpected t_sl php workings and policies of this site About Us Learn more about Stack
Syntax Error, Unexpected T_sl Heredoc
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions php eot Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join
Parse Error: Syntax Error, Unexpected End Of File In
them; it only takes a minute: Sign up Parse error: syntax error, unexpected T_SL up vote -2 down vote favorite I am recieveing a syntax error, unexpected T_SL at the EOD. From what i have been reading it's normally from extra spaces/tabs/white space. In this case there are none. I have even hard coded the email and was still heredoc php receiving the error. I have tried placing the end of the EOD on another line with no spaces and still doesn't work. Any other ideas? $emailSubject = 'crazy php scripting!'; $webMaster = 'someEmail@yahoo.com'; $email = 'someEmail@live.com'; /* This is the line i get errors from. */ $body = <<
Email:{$email}
EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); php email email-integration share|improve this question asked Jul 19 '13 at 14:27 Sari Rahal 840524 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted change this line $body = <<
Email:{$email}
EOD; to: $body = <<
Email:{$email}
EOD; Because heredocs symbol should be at beginning of the new line share|improve this answer answered Jul 19 '13 at 14:28 user1646111 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree t
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax error, unexpected T_SL http://stackoverflow.com/questions/17748582/parse-error-syntax-error-unexpected-t-sl up vote 7 down vote favorite 1 I'm fairly new to php and I'm using a script that creates a function called the "mime_mailer" which essentially allows me to use PHP to send emails that are able to be designed with CSS instead of being merely plain text. Yet, in my registration script, I try to write some code that sends a CSS email, but http://stackoverflow.com/questions/5416437/syntax-error-unexpected-t-sl I get an error saying that there's a syntax error. Could someone please fill me in on this? $subject = "Your Red-line Account"; $css = "body{ color: #090127; background-color: #f0f0f0; }"; $to = $usercheck; //Message $message =<< Hi $first_name, Your Red-line account is almost complete. To finish, go to The Red-line and enter your eight digit confirmation code. Your confirmation code is: $code Sincerely, The Red-line Operator