You are here

php

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.

Tags: 

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.

Tags: 

Arrays With UTF-16 Strings Will Give You Headaches

Today I was working with some CSV files using PHP's "fgetcsv":http://php.net/fgetcsv and "array_search":http://php.net/array_search functions. I had a row like this:
cus_no,first_name,last_name,full_name,fax_no,phone_no,e_mail
Looks normal, right? But when I was running array_search('cus_no', $headerRow) it would return FALSE.
Tags: 

Getting a java.io.CharConversionException 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: java.io.CharConversionException <> Anyway, after *much* hair pulling, the answer was found!