asmith Posted June 10, 2008 Share Posted June 10, 2008 hi i struggled with a piece of code for like 3 hours, then i decided to delete everything to find out what's the problem. this simple code : <?php include('anyfile.php'); echo ' <html> <body> <table border="10"> <tr><td>asdas</td></tr></table> </body> </html>'; ?> If this file is saved in ANSI , everyting goes right. IF this file is saved in UTF-8 (as i'm using arabic characters i have to save it on UTF-, the include line inserts gap at the top of the page. a white line with a height of 5 maybe, that i killed myself to remove, it won't go unless i remove the include line. (i've tried all body margin , padding to 0 . it is not part of the html i guess) What should i do ? ??? ??? ??? (it all happens in IE 6. FF is fine about it) Link to comment https://forums.phpfreaks.com/topic/109607-solved-include-inserting-gap-in-ie-6/ Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 This is due to the BOM (byte order marker) at the start of UTF documents. Your editor may give you the option of not including these when you save your file... Link to comment https://forums.phpfreaks.com/topic/109607-solved-include-inserting-gap-in-ie-6/#findComment-562249 Share on other sites More sharing options...
asmith Posted June 10, 2008 Author Share Posted June 10, 2008 i'm using notepad. Should i save the file in another editor? Link to comment https://forums.phpfreaks.com/topic/109607-solved-include-inserting-gap-in-ie-6/#findComment-562285 Share on other sites More sharing options...
discomatt Posted June 10, 2008 Share Posted June 10, 2008 Use another editor... one that allows you to take BOM marks out of UTF encoded files. I like using EditPad Lite ( no direct PHP support ) for snippets and Eclipse PDT for larger projects. Link to comment https://forums.phpfreaks.com/topic/109607-solved-include-inserting-gap-in-ie-6/#findComment-562398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.