[PHP] Im not good at coding, please help me if you can

pubudusoft

Power Member
Jr. VIP
Joined
Aug 21, 2011
Messages
776
Reaction score
174
Hello,

Im trying to use this script:
http://www.blackhatworld.com/blackh...s-viral-script-plugin-wordpress-its-free.html

So i added,
Code:
<?php include ('./wp-content/plugins/royserpa/cookie.php') ?>

To my wordpress header. And it gives this error msg.
Code:
[B]Warning[/B]:  Cannot modify header information - headers already sent  by (output started at  /home3/[B]MyDomain[/B]/public_html/[B]MyDomain[/B].com/wp-content/themes/eStore/header.php:2)  
in [B]/home3/MyDomain/public_html/[B]MyDomain[/B].com/wp-content/plugins/royserpa/cookie.php[/B] on line [B]19[/B]

Where should i add that "include" thing? In that thread, writer asked to add it to the header...
 
It will need to be near the very top so that it is one of the first lines to be executed. Once information has been sent, you cannot add header info, it has to be sent first. But if the header information has already been sent by another page you will need to find the page that is posting the header info and put that include line in that page instead.
 
That error happens when you already sent header information to the browser (be it, a redirect or something like that).

What has probably happened, you included the cookie.php after sending header information (check out for something along the lines of Header('Location') or whatever you might have before that line). It depends on the structure of your header, but it should be one of the first lines, if not the first one itself.
 
Moved thread from black hat seo to PHP scripting section.
 
put thi on the top of index.php :
ob_start();


that should take the error away.,
 
Please check if your php file is saved in UTF-8 mode.
In this case there could be first 2 hidden bytes before "<?php" tag.
Just remove these bytes in Hex editor.
Hope it helps!
 
put thi on the top of index.php :
ob_start();


that should take the error away.,

That should fix it, but I always prefer arranging the codes perfectly to not make the error first of all. :)
 
I can help you with this, let me know if it's still an issue for you.
 
friend here you just need to find sql detail from your wp_config.php file simple then use that info here
 
Back
Top