spaces in my source code.. any help? |
[eluser]Zeeshan Rasool[/eluser]
i have blank spaces in my CI site page's source view. Almost 40 lines are blanks and then code appeares. Any idea about this issues. Also can it makes any problem if we see in SEO point of view Thanks:
[eluser]jedd[/eluser]
[quote author="zEsHaN" date="1256556110"]i have blank spaces in my CI site page's source view. Almost 40 lines are blanks and then code appeares. [/quote] In every page, or some pages? Post the view of one of the pages that is causing the 'problem'. Consider that every blank line not encapsulated by <?php and ?> tags will appear as a blank line in your page source. Quote:Also can it makes any problem if we see in SEO point of view Eh?
[eluser]Zeeshan Rasool[/eluser]
Offcourse its on every page because im using a common view as a container. When i click on view page source then from top 44 line are blank and then after the 44th line html starts Code: ..
[eluser]eoinmcg[/eluser]
Are you closing your php tags? http://ellislab.com/codeigniter/user-gui...losing_tag
[eluser]jedd[/eluser]
This is one of those types of bugs that can't really sneak up on you - it suggests that you're not regularly checking the output of your application while you develop it. If you have a [url="http://git-scm.com/"]decent svn[/url], you could [url="http://progit.org/book/ch6-5.html"]work back until you find the point[/url] at which the problem doesn't exist, and then identify what change you made that introduced it. If you have errors really well suppressed, you might not see 'headers already sent' errors (though I didn't think you could suppress things that much) and in that case you might have html output being delivered by models/controllers/libraries - hence you'd want to look for php-close tags with lots of blank lines following. This seems an unlikely scenario, however. Really, it's one of those bugs that there's no way we can say 'Oh, 44 blank lines, you say? Easy- that's the well known 44-blank line bug' and then point you at the wiki or previous thread reference. Instead you're just going to have to isolate / substitute each of the components that make up your view until you find the culprit.
[eluser]John_Betong[/eluser]
Can you try this: $config['log_threshold'] = 1; 1. set the above value in your ./application/config/config.sys 2. delete your error log file. 3. run your program 4. post the results of the log file.
[eluser]daparky[/eluser]
This usually happens to me if i have alot of if statements on the page, e.g. Code: <?php And so on. I fixed this by doing this: Code: <?php And so on again.
[eluser]BrianDHall[/eluser]
[quote author="zEsHaN" date="1256579257"]Offcourse its on every page because im using a common view as a container. When i click on view page source then from top 44 line are blank and then after the 44th line html starts Code: .. Maybe change your common header to a totally empty file and see if you still get blanks. If so then it is being fed from somewhere else. The easiest way is probably to call your view at the top of a controller function (page) and see if it has blanks - if not, then it is somewhere inside the functions. They will probably still be there, which means it is higher up - in a constructor, something you are autoloading, a config file, something one of your classes extends, etc. This could theoretically be a really bad example of content encoding problems, so make sure you aren't saving them in some weird way and ensure you use an editor that supports UTF properly if you are trying to use UTF-8.
[eluser]BrianDHall[/eluser]
If you really want to just get on with it and just want to pretend it didn't happen, try this: Code: $html = $this->load->view('common', $data, true); Tadda, fixed!
[eluser]Zeeshan Rasool[/eluser]
thanks you all my friends, i have checked but its fine on local but making problem online. also i get log file but it shows nothing Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> |
Welcome Guest, Not a member yet? Register Sign In |