Sur le site officiel, http://php.net/manual/fr/function.include.php, parmi les commentaires, se trouve celui-ci :
Citation :
Anonymous 11-Nov-2009 07:35
I was having problems when HTTP headers were being sent before I was ready. I discovered that this happened only when I was including a file at the top of my script. Since my included file only contained PHP with no whitespace outside the tags, this behavior seemed incorrect.
The editor I was using was saving the files in UTF8 format, sometimes including the redundant Byte Order Mark at the beginning of the file. Any Unicode-aware editor would implicitly hide the presence of the BOM from the user, making it hard to notice the problem. However, by using a hex editor I was able to see and remove the three bytes, restoring normal behavior.
Moral: Prevent your editor from adding an invisible Unicode Byte Order Mark to the beginning of your source code!
|
Si cela ne marche pas, ou si ce n'est pas pratique, on peut essayer autre chose à la place du include :
<?php echo file_get_contents($page);?> |
Parmi les options de file_get_contents, il y en a une pour choisir une position de départ (offset) qu'il faut peut-être utiliser. Voir les options de http://fr2.php.net/manual/fr/funct [...] ntents.php