PHP Help Needed

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
I have this odd thing appearing in some php code I'm using. Anyone know how to get rid of it? Below is what is appearing.

Odd thing:
odd.jpg


Here is the code.
PHP:
<?php

define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);

// The Directory to the forum you are using this on. 
// You do not need a beggining or trailing slash
$directory_to_forum = "forums"; 

require dirname(__FILE__)."/".$directory_to_forum."/global.php";

$plugins->run_hooks("site_news_plugin_run");

?>
 
Last edited:

WoWChat

New Member
Messages
62
Reaction score
0
Points
0
O_O Sorry chou, I don't know what to tell you, I have never seen that before.
 

flinx

New Member
Messages
68
Reaction score
0
Points
0
This piece of script doesn't output anything. The problem might be in this function:
$plugins->run_hooks("site_news_plugin_run");
Is it in global.php?
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
I don't need help with this anymore. I think it was something with the mybb plugin. I tried a different method and that wierd thing is gone.
 

mattura

Member
Messages
570
Reaction score
2
Points
18
Don't know how you solved it, but I can tell you what it was:
a byte order mark (http://en.wikipedia.org/wiki/Byte_Order_Mark)

It was probably the result of saving in UTF encoding using a microsoft editor such as notepad. They tend to put the mark at the start of the files even though it is not necessary.

I had that problem when I tried to use some special characters in my webpages, changed everything to UTF-8 for multilingual character compatibility, resulting in your problem.

It has nothing to do with your php code!
 
Top