[thelist] Slightly [OT] - Think Twice When Migrating to Blogger Beta

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Sat Dec 16 23:40:27 CST 2006


- if you have localized content
- and you have a large blog

Or be prepared to share my suffering [1].


And here are two tips the OT:

<tip author="Volkan Ozcelik" type="php">
two quick php tips:

In php, if your rendered (X)HTML output includes uncessarry whitespace at
beginning of the buffer (which makes it an invalid XML) make sure that
you trimmed all whitespace from the files imported with

- include
- require
- require_once etc.

Extra whitespace can be a real pain in php. It can cause errors if you have
strict XML (RSS) feed, and it can cause render anomailes in some browsers
(like MSIE).

Actually most of text editors and IDEs has some kind of a
"trim trailing space" option.

<tip author="Volkan Ozcelik" type="php">
If your php page occasionally sends "header information already sent"
try including ob_start at the beginning of your file(s) and ob_end_flush()
at the end.

Here's an example:

< ?php

function callback($buffer)
  // replace all the apples with oranges
  return (str_replace("apples", "oranges", $buffer));


? >
< html>
< body>
< p>It's like comparing apples to oranges.< /p>
< / body>
< / html>
< ? php


? >


Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/cre8/blog/
+> Going solo in Turkish: http://www.volkanozcelik.com/donkisot/
+> My projects/studies/trials/errors : http://www.sarmal.com/
+> Sardalya JavaScript Library: http://www.sarmal.com/sardalya/

More information about the thelist mailing list