Headers already sent error – how do I avoid?
-
Hello everyone,
I’m creating a theme and I have created a PHP file that saves as a css file:
<?php include '../../../wp-blog-header.php'; ?> <?php header("Content-type: text/css"); ?> some normal CSS styles here
This works fine on my localhost and my web host, but SOME hosts are displaying a “header already sent” error.
How do I avoid this? I’m guessing it’s because I’m including wp-blog-header.php but this is needed so I can grab WordPress’s functions.
Also why would this error only fire on some hosts and not all of them?
wierd…
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Headers already sent error – how do I avoid?’ is closed to new replies.