Forum Moderators: coopster

Message Too Old, No Replies

How to add a signature to a PHP file

include works but creates odd characters

         

moishe

11:51 pm on Nov 4, 2006 (gmt 0)

10+ Year Member



Howdy Ya'll,

I have PHP script that I use to put XML/RSS news feeds on my sites, works great, very customizable and easy for noobs. I am gonna post in on my website for people to download but I decided I want to put a link back to my site that will show up at the bottom of the feed. Here is what I added to do that:

(obviously this is just the end of the code, saw no reason to code dump the whole thing-- also examplified)

print ("<p class=\"itemdescription\">" . $rss_channel["items"][$i]["DESCRIPTION"] . "</p>"); }
} else {
print ("<b>There are no articles in this feed.</b>");

}
include ("http://www.example.com/moishe-php-rss.inc");
}
?>

this pulls an include that creates a small text link back to my site but it also adds the characters "" just above it. I am sure its just a formatting issue.

Any ideas?

encyclo

11:57 pm on Nov 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member





That string's impossible to search, but it's a byte-order mark (BOM). So you have an encoding problem, probably caused by Notepad or similar adding it when saving as Unicode, but served subsequently with a different character encoding. See this thread for some more details:

[webmasterworld.com...]

moishe

12:09 am on Nov 5, 2006 (gmt 0)

10+ Year Member



Thank you TextPad fixed it:)