![]() |
Blank Spaces appears - please help! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Blank Spaces appears - please help! (/showthread.php?tid=23664) |
Blank Spaces appears - please help! - El Forum - 10-18-2009 [eluser]Bart Majewski[/eluser] Hello everybody! I am just finishing my project, and everything was fine till I was send HTML with CSS to put into my CMS. I have created sth like masterpages - so I am sending to one view data with names of other views. So in my Views folder I have: [views] - [pages] - home.php - about.php - contact.php .. etc. - template.php - menu.php - header.php - footer.php my template.php looks like that: Code: <?php I am using UTF-8 coding, and in my site, wierd blank spaces are appearing: Site screen shoot #1 The same thing happens in FireBug: FireBug screen shoot #2 Another very wierd thing is, that my header.php view looks like that: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> and CI is putting all those links and scripts Code: <link href="<?php echo base_url(); ?>style.css" rel="stylesheet" type="text/css" /> into <body> tag (img here ![]() FireBug screen shoot #3 (SUPPOSED TO BE SCRIPT TYPE="TEXT/JAVASCRIPT" LINKS WHERE APPEARS [REMOVED] IN CODE VIEW ABOVE!) Does anybody knows what is going on? I am using open php tags everywhere! I have read some posts about blank spaces (like this one Blank space problem , trying to change encoding, nothing was changed. But when I change encoding in my browser from UTF-8 to for example Windows-1251, I am getting strange characters (please look at another website screen shoot HERE Please, please for help. My deadline is comming, I have to submit my project! So I would be very gratefull for any help!!! Blank Spaces appears - please help! - El Forum - 10-19-2009 [eluser]imn.codeartist[/eluser] what IDE did you use to program the code ? Blank Spaces appears - please help! - El Forum - 10-19-2009 [eluser]Bart Majewski[/eluser] I am using Dreamwaver CS4 for this project. Blank Spaces appears - please help! - El Forum - 10-19-2009 [eluser]Bart Majewski[/eluser] Ok, thank you dixcoder, you made my day! I have NetBeans 6 and opened all my files in it. It turns out, that this was encoding issue. DW was putting a signs like ' - ' at the first line in every file, and in DW it was invisible. Sorry for the mess here! Wasn't any CI bug, my bad tho. Cheers, BM Blank Spaces appears - please help! - El Forum - 10-20-2009 [eluser]khagendra[/eluser] Code: $site = $this->load->view('site/header', $site_data); Here in your code You are trying to returning the view as a string. But, i think, you have forgotton to use the third patameter i.e. true. here is the example Code: $string = $this->load->view('viewName', '', true); so try like this Code: $site = $this->load->view('site/header', $site_data, true); it will work Blank Spaces appears - please help! - El Forum - 10-20-2009 [eluser]Bart Majewski[/eluser] Thank you! It works! |