Php – Unexpected end in PHP script

PHP

I really can't find the error. Here is my code:

<?
    // Action: add news
    if( array_key_exists('create_new', @$_POST) )
    {
?>
  ...
<?
        exit();
    }
?>

Before this my problem was in construction: <?=...;?> My web server (Apache) did not understand the syntax so I rewrote the method without it, but now I really can't find a solution.

Best Answer

Add a space before the ? and after the ; here:

$_SERVER['REQUEST_URI'];?>

Replace all <? by <?php