Message: Cannot modify header information - headers already sent by |
[eluser]Coder Death[/eluser]
Please Tell me why am i getting this error ? A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at C:\www\_app\_app_files\controllers\w_display.php:2) Filename: libraries/Session.php Line Number: 672 Locally in works but on the server online it displays the erroe
[eluser]CroNiX[/eluser]
Are you echoing something directly from the controller?
[eluser]weboap[/eluser]
echoing something from the controller as @CrNix said, or you have space before <?php
[eluser]InsiteFX[/eluser]
Or you are saving your files with the BOM! In this case do a view source and you should see funny characters at the very top of the file.
[eluser]Coder Death[/eluser]
Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Hi thanks a lot the problem was the space before the <?php?> I remove it and it seems to work. Why do I not get this kind of error on my computer? it is only when I upload the server. Thank you
[eluser]Coder Death[/eluser]
Anyway, another problem is on the links. When I am on the home page , all the links work fine but if I enter one link and try from that page to enter another link it gets error. I explain My home page Code: localhost/index.php Code: localhost/index/controller/link1 But if I enter Link1 and point now on link2 the link displays is Code: localhost/index/controller/link1/index/controller/link1 My config file is set to Code: $config['index_page'] = 'index.php';
[eluser]weboap[/eluser]
http://ellislab.com/codeigniter/user-gui...elper.html Code: //load in your controller or autoload... Code: echo anchor('/controller/link1', 'My link1', 'title="my link 1 title"'); |
Welcome Guest, Not a member yet? Register Sign In |