Archive for the 'PHP' Category

An Error Logging Decorator for the MySQLi Object (eMySQLi.php)

Okay, the first question I can hear people asking is:  Why? Why another database wrapper or Decorator object? Aren’t there enough of them out there already? Well, frankly, yes…  but I had a ton of this in my code and no easy pre-packaged solution I could find to resolve it:
$sql = ‘SELECT * FROM table’;
if ( [...]

Filed in PHP, Technology No Responses yet

Recursive Directories Into Multi-dimensional Array

I was messing around the other day with creating a multi-dimensional array of file names from recursively searching a given file system path. I tried the RecursiveDirectoryIterator and the RecursiveIteratorIterator from the SPL. While they are both very useful and fairly simple to implement, I needed to keep the multi-dimensional nature of the file system [...]

Filed in PHP, Technology 2 Comments so far

Change in CURLOPT_NOBODY option

Be careful when upgrading PHP, if you’re using cURL. Somewhere between PHP 5.2.6 and 5.2.9, the definition of the CURLOPT_NOBODY option was changed. After upgrading (under duress — but that’s a different story…), all my ecommerce scripts that handled posting customer data to our processing company were completely fuxored. My main ecommerce site was on [...]

Filed in PHP, Technology No Responses yet