You are here


Taking a look at output buffering in PHP

Output buffering in PHP isn't new. It was introduced in PHP 4 and for the most part, it's one of those things that unless you're not using a CMS or a framework, you'll never really need to mess with it much.

However, today I was playing around with doing client-side redirections in JavaScript and wanted to see first-hand how they worked. Modern browsers begin parsing the HTML before it is completely delivered and once the <script> tag is parsed, it is executed immediately.


Redirect checker script

Here's a quick script I wrote to test redirects. Useful if you're trying to... test if your redirects are working properly.


Arrays With UTF-16 Strings Will Give You Headaches

Today I was working with some CSV files using PHP's "fgetcsv": and "array_search": functions. I had a row like this:
Looks normal, right? But when I was running array_search('cus_no', $headerRow) it would return FALSE.

Getting a with pdftk while using MAMP?

Man, talk about a frustrating problem! I kept getting this errors while calling pdftk (from the mac installer, which the version as of this writing is 1.12): Unhandled Java Exception: <> Anyway, after *much* hair pulling, the answer was found!