0

Suffering for hours Trying to fix it by no Hope

syntax error, unexpected $end in C:\???????\index.php on line 547

the lines form 511 to 547 are

<?
ContentBlockFoot();
?>
            </td>
        </tr>
    </table>

<?
BottomCode();

function error_handler($errno, $errstr, $errfile, $errline)
{

    switch ($errno)
    {
	case FATAL:
            echo "<b>FATAL</b> [$errno] $errstr<br>\n";
	    echo "  Fatal error in line ".$errline." of file ".$errfile;
	    echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n";
	    echo "Aborting...<br>\n";
	    exit(1);
	break;
	case ERROR:
	     echo "<b>ERROR</b> [$errno] $errstr<br>\n";
	break;
	case WARNING:
	//    echo "<b></b> [$errno] $errstr<br>\n";
	break;
	default:
	break;
    }

}


?>

Please help !!!

8
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by almostbob
0

You are probably missing an ending quote (") somewhere in your code. A missed end brace "}", bracket "]", or parenthesis ")" can also cause
the unexpected $end in a script as well.

0

Wherever the bug is it isn't in that piece of code. But as the previous post states it usually means a missing curly bracket { or }.

0

Just another comment, which might not be a problem:

Have you tried using the full <?php tag instead of just the <? tag? Depending on your configuration, using short tags can cause funny stuff to happen.

0

If you copied your code and pasted it, this also causes this problem, what you can do is delete the <?php from your copied code and retype it manually. Hope this helps.

0

The error showing that you are missing brace in your code. Post your full code to identify where it is missing or find by yourself in a editor.

0

line numbers in executing php scripts are not the same as line numbers in the source.
executing scripts that contain any include(); statements, the included file's line count is counted in the executing file
check line counts in includes and the missing brace will likely be that many lines before the indicated line

0

It works for me.

that was the point, untangling error messages, the OP couldnt find a fault in that region of code and wanted some input on where and how to find the fault

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.