Leerzeichen oder Tab vor der XML Deklaration

Hallo zusammen,
ich suche seit Stunden vergebens nach dem Fehler der mir vor der XML Deklaration des Dokumentes ein Leerzeichen generiert und mein Template zerschießt.
Folgender Code liegt dem zu Grunde:

[PHP]<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>

<?php echo $content_top; ?>
<?php foreach ($breadcrumbs as $breadcrumb) { ?> <?php echo $breadcrumb['separator']; ?><?php echo $breadcrumb['text']; ?> <?php } ?>

<?php echo $heading_title; ?>

<?php if ($thumb || $images) { ?>
<?php if ($thumb) { ?>
<?php echo $heading_title; ?>
<?php } ?> <?php if ($images) { ?>
<?php foreach ($images as $image) { ?> <?php echo $heading_title; ?> <?php } ?>
<?php } ?>
<?php } ?>
<?php if ($manufacturer) { ?> <?php echo $text_manufacturer; ?> <?php echo $manufacturer; ?>
<?php } ?> <?php echo $text_model; ?> <?php echo $model; ?>
<?php echo $text_reward; ?> <?php echo $reward; ?>
<?php echo $text_stock; ?> <?php echo $stock; ?>
<?php if ($price) { ?>
<?php echo $text_price; ?> <?php if (!$special) { ?> <?php echo $price; ?> <?php } else { ?> <?php echo $price; ?> <?php echo $special; ?> <?php } ?>
<?php if ($tax) { ?> <?php echo $text_tax; ?><?php echo $tax; ?>
<?php } ?> <?php if ($points) { ?> <?php echo $text_points; ?><?php echo $points; ?>
<?php } ?> <?php if ($discounts) { ?>
<?php foreach ($discounts as $discount) { ?> <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?>
<?php } ?>
<?php } ?>
<?php } ?> <?php if ($options) { ?>

<?php echo $text_option; ?>


<?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'select') { ?>
<?php if ($option['required']) { ?> * <?php } ?> <?php echo $option['name']; ?>:
<?php echo $text_select; ?> <?php foreach ($option['option_value'] as $option_value) { ?> <?php echo $option_value['name']; ?> <?php if ($option_value['price']) { ?> (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>) <?php } ?> <?php } ?>

<?php } ?>

<?php } ?>

<?php } ?> <?php if ($option['type'] == 'image') { ?>
<?php if ($option['required']) { ?> * <?php } ?> <?php echo $option['name']; ?>:
<?php } ?>
<?php echo $text_qty; ?>  <?php echo $button_cart; ?>
   <?php echo $text_or; ?>   
<?php if ($minimum > 1) { ?>
<?php echo $text_minimum; ?>
<?php } ?>
<?php if ($review_status) { ?> <?php } ?>
<?php echo $tab_description; ?> <?php if ($attribute_groups) { ?> <?php echo $tab_attribute; ?> <?php } ?> <?php if ($review_status) { ?> <?php echo $tab_review; ?> <?php } ?> <?php if ($products) { ?> <?php echo $tab_related; ?>(<?php echo count($products); ?>) <?php } ?>
<?php echo $description; ?>
<?php if ($attribute_groups) { ?>
<?php foreach ($attribute_groups as $attribute_group) { ?> <?php foreach ($attribute_group['attribute'] as $attribute) { ?> <?php } ?> <?php } ?>
<?php echo $attribute_group['name']; ?>
<?php echo $attribute['name']; ?> <?php echo $attribute['text']; ?>
<?php } ?> <?php if ($products) { ?>
<?php foreach ($products as $product) { ?>
<?php if ($product['thumb']) { ?>
<?php echo $product['name']; ?>
<?php } ?> <?php if ($product['price']) { ?>
<?php if (!$product['special']) { ?> <?php echo $product['price']; ?> <?php } else { ?> <?php echo $product['price']; ?> <?php echo $product['special']; ?> <?php } ?>
<?php } ?> <?php if ($product['rating']) { ?>
<?php echo $product['reviews']; ?>
<?php } ?> <?php echo $button_cart; ?>
<?php } ?>
<?php } ?> <?php if ($tags) { ?>
<?php echo $text_tags; ?> <?php foreach ($tags as $tag) { ?> <?php echo $tag['tag']; ?>, <?php } ?>
<?php } ?> <?php echo $content_bottom; ?> <?php if ($options) { ?> <?php foreach ($options as $option) { ?> <?php if ($option['type'] == 'file') { ?> <?php } ?> <?php } ?> <?php } ?> <?php echo $footer; ?>[/PHP]

Es muss an diesem Quellcode liegen, da alle anderen Scripte welche ebenfalls den Header etc. laden funktionieren.
Hat vielleicht jemand eine Idee.

VG
Björn

In diesem Code kann man nichts erkennen, da es sich mit Sicherheit auch nicht um den kompletten Code handelt. Relevant wäre $header und alles vor Ausgabe von dieser Variablen.

Tipp: prüfe auch mal den Zeichensatz der Datei. Sie sollte nicht mit BOM gespeichert sein.

Meines Wissens nach findet bei deinem Quellcode ein ständiger Compiler-Wechsel statt, wegen den vielen <?php ?> tags und wird dadurch enorm belastet!

Grüße

Das ist hinsichtlich der Performance kein Problem.

Perfekt… Danke… Es lag tatsächlich am BOM der geladenen Sprachdatei. :slight_smile: