[pmwiki-devel] Please, with the ?>

Ben Wilson dausha at gmail.com
Mon Mar 26 12:19:28 CDT 2007


I noticed some problems with the sitemap.php script found on
Cookbook.GoogleSitemaps.[1] Essentially, there was a line at the top
of the script, which upset Google. I thought this was a PmWiki issue,
so I checked PmWiki.org and found it was not the issue. I then checked
to see if the problem was with the trailing ?> in recipe files. As you
may know, a PHP file does not need to have the ?> to end the file.
Anyway, I greped and found that six of the dozens of recipes in my
cookbook folder had the trailing ?>. I inspected each one, and took
them out. I discovered that one recipe had a newline after the ?>,
which was the cause.

Having taken it out, Google is now happy with my sitemap.

Anyway, I thought I'd shoot an email to recipe authors to remind them
that ?> is not necessary, and can _sometimes_ have unintended
consequences. :-)

-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill

[1]: http://pmwiki.org/wiki/Cookbook/GoogleSitemaps



More information about the pmwiki-devel mailing list