What are causing these errors? [duplicate]











up vote
-2
down vote

favorite
1













This question already has an answer here:




  • PHP parse/syntax errors; and how to solve them?

    15 answers



  • Reference - What does this error mean in PHP?

    31 answers





Parse error: syntax error, unexpected 'outputHeader' (T_STRING) in
C:wwwplay.php on line 4




I am getting this error for the following code.



<?php
include 'common.php';
outputHeader("Hangman");
?>



Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ','
or ';' in C:wwwcommon.php on line 4




And this error for this code:



<?php
function outputHeader($title) {
echo '<!DOCTYPE html>';
echo '<html lang = en>';
echo '<head>';
echo '<meta charset="UTF-8">';
echo '<title>'.$title.'</title>';
echo '<link href = "../CSS/hangmantest.css" rel = "stylesheet" type = "text/css"> ';
echo '</head>';
echo '<body>';
echo '<html lang = en>';
}
?>









share|improve this question















marked as duplicate by Funk Forty Niner html
Users with the  html badge can single-handedly close html questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 8 at 11:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • I tested your code and It works
    – executable
    Nov 8 at 11:14










  • @executable How come? It doesn't seem to work on my laptop. I'm still getting these errors.
    – Devika. S
    Nov 8 at 11:17










  • You have syntax error in play.php and common.php
    – executable
    Nov 8 at 11:17








  • 2




    @executable Your edit even though the OP accepted it, no longer supports the line error. Plus, there may have been hidden unicode characters that could be causing this and were possibly removed.
    – Funk Forty Niner
    Nov 8 at 11:21






  • 1




    @Devika.S You may have a hidden unicode character(s). Use a code editor that lets you view it in hex mode.
    – Funk Forty Niner
    Nov 8 at 11:23

















up vote
-2
down vote

favorite
1













This question already has an answer here:




  • PHP parse/syntax errors; and how to solve them?

    15 answers



  • Reference - What does this error mean in PHP?

    31 answers





Parse error: syntax error, unexpected 'outputHeader' (T_STRING) in
C:wwwplay.php on line 4




I am getting this error for the following code.



<?php
include 'common.php';
outputHeader("Hangman");
?>



Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ','
or ';' in C:wwwcommon.php on line 4




And this error for this code:



<?php
function outputHeader($title) {
echo '<!DOCTYPE html>';
echo '<html lang = en>';
echo '<head>';
echo '<meta charset="UTF-8">';
echo '<title>'.$title.'</title>';
echo '<link href = "../CSS/hangmantest.css" rel = "stylesheet" type = "text/css"> ';
echo '</head>';
echo '<body>';
echo '<html lang = en>';
}
?>









share|improve this question















marked as duplicate by Funk Forty Niner html
Users with the  html badge can single-handedly close html questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 8 at 11:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • I tested your code and It works
    – executable
    Nov 8 at 11:14










  • @executable How come? It doesn't seem to work on my laptop. I'm still getting these errors.
    – Devika. S
    Nov 8 at 11:17










  • You have syntax error in play.php and common.php
    – executable
    Nov 8 at 11:17








  • 2




    @executable Your edit even though the OP accepted it, no longer supports the line error. Plus, there may have been hidden unicode characters that could be causing this and were possibly removed.
    – Funk Forty Niner
    Nov 8 at 11:21






  • 1




    @Devika.S You may have a hidden unicode character(s). Use a code editor that lets you view it in hex mode.
    – Funk Forty Niner
    Nov 8 at 11:23















up vote
-2
down vote

favorite
1









up vote
-2
down vote

favorite
1






1






This question already has an answer here:




  • PHP parse/syntax errors; and how to solve them?

    15 answers



  • Reference - What does this error mean in PHP?

    31 answers





Parse error: syntax error, unexpected 'outputHeader' (T_STRING) in
C:wwwplay.php on line 4




I am getting this error for the following code.



<?php
include 'common.php';
outputHeader("Hangman");
?>



Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ','
or ';' in C:wwwcommon.php on line 4




And this error for this code:



<?php
function outputHeader($title) {
echo '<!DOCTYPE html>';
echo '<html lang = en>';
echo '<head>';
echo '<meta charset="UTF-8">';
echo '<title>'.$title.'</title>';
echo '<link href = "../CSS/hangmantest.css" rel = "stylesheet" type = "text/css"> ';
echo '</head>';
echo '<body>';
echo '<html lang = en>';
}
?>









share|improve this question
















This question already has an answer here:




  • PHP parse/syntax errors; and how to solve them?

    15 answers



  • Reference - What does this error mean in PHP?

    31 answers





Parse error: syntax error, unexpected 'outputHeader' (T_STRING) in
C:wwwplay.php on line 4




I am getting this error for the following code.



<?php
include 'common.php';
outputHeader("Hangman");
?>



Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ','
or ';' in C:wwwcommon.php on line 4




And this error for this code:



<?php
function outputHeader($title) {
echo '<!DOCTYPE html>';
echo '<html lang = en>';
echo '<head>';
echo '<meta charset="UTF-8">';
echo '<title>'.$title.'</title>';
echo '<link href = "../CSS/hangmantest.css" rel = "stylesheet" type = "text/css"> ';
echo '</head>';
echo '<body>';
echo '<html lang = en>';
}
?>




This question already has an answer here:




  • PHP parse/syntax errors; and how to solve them?

    15 answers



  • Reference - What does this error mean in PHP?

    31 answers








php html include






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 11:18









executable

808221




808221










asked Nov 8 at 11:09









Devika. S

45




45




marked as duplicate by Funk Forty Niner html
Users with the  html badge can single-handedly close html questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 8 at 11:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Funk Forty Niner html
Users with the  html badge can single-handedly close html questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 8 at 11:31


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • I tested your code and It works
    – executable
    Nov 8 at 11:14










  • @executable How come? It doesn't seem to work on my laptop. I'm still getting these errors.
    – Devika. S
    Nov 8 at 11:17










  • You have syntax error in play.php and common.php
    – executable
    Nov 8 at 11:17








  • 2




    @executable Your edit even though the OP accepted it, no longer supports the line error. Plus, there may have been hidden unicode characters that could be causing this and were possibly removed.
    – Funk Forty Niner
    Nov 8 at 11:21






  • 1




    @Devika.S You may have a hidden unicode character(s). Use a code editor that lets you view it in hex mode.
    – Funk Forty Niner
    Nov 8 at 11:23




















  • I tested your code and It works
    – executable
    Nov 8 at 11:14










  • @executable How come? It doesn't seem to work on my laptop. I'm still getting these errors.
    – Devika. S
    Nov 8 at 11:17










  • You have syntax error in play.php and common.php
    – executable
    Nov 8 at 11:17








  • 2




    @executable Your edit even though the OP accepted it, no longer supports the line error. Plus, there may have been hidden unicode characters that could be causing this and were possibly removed.
    – Funk Forty Niner
    Nov 8 at 11:21






  • 1




    @Devika.S You may have a hidden unicode character(s). Use a code editor that lets you view it in hex mode.
    – Funk Forty Niner
    Nov 8 at 11:23


















I tested your code and It works
– executable
Nov 8 at 11:14




I tested your code and It works
– executable
Nov 8 at 11:14












@executable How come? It doesn't seem to work on my laptop. I'm still getting these errors.
– Devika. S
Nov 8 at 11:17




@executable How come? It doesn't seem to work on my laptop. I'm still getting these errors.
– Devika. S
Nov 8 at 11:17












You have syntax error in play.php and common.php
– executable
Nov 8 at 11:17






You have syntax error in play.php and common.php
– executable
Nov 8 at 11:17






2




2




@executable Your edit even though the OP accepted it, no longer supports the line error. Plus, there may have been hidden unicode characters that could be causing this and were possibly removed.
– Funk Forty Niner
Nov 8 at 11:21




@executable Your edit even though the OP accepted it, no longer supports the line error. Plus, there may have been hidden unicode characters that could be causing this and were possibly removed.
– Funk Forty Niner
Nov 8 at 11:21




1




1




@Devika.S You may have a hidden unicode character(s). Use a code editor that lets you view it in hex mode.
– Funk Forty Niner
Nov 8 at 11:23






@Devika.S You may have a hidden unicode character(s). Use a code editor that lets you view it in hex mode.
– Funk Forty Niner
Nov 8 at 11:23



















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes