How to get the plugins directory in WordPress

Shows a few useful function to get the path to the plugins directory in wordpress.

Read more No Comments »

PDO in PHP execute() does nothing

The execute() method seems to work fine when executing a stored procedure, but a look in the database shows no data was added.

Read more No Comments »

Install PDO for PHP on IIS 7

How to install PDO for PHP on IIS 7.

Read more No Comments »

Check variable exists and is defined in PHP

Shows how to check a variable is defined and assigned to in PHP.

Read more No Comments »

PHP not outputting errors in browser

PHP sending an empty page to the browser instead of an error message is not particularly helpful when your debugging an application. Here’s how to fix it (works on Linux Mint and probably Ubuntu).

Read more No Comments »

Efficient looping in PHP

I took some time to investigate performance implications of different methods of looping in PHP.

Read more No Comments »

Router::connect in Cake. Forward URL to a controller

I’ve seen a few example of how to manually redirect one URL to a controller, so I thought I’d try and put an example of how to re-route URLs to a controller in a situation where you have lots of different URLs such as a CMS or e-commerce site.

Read more No Comments »

Redirect to another Controller in CakePHP

To cause a 302 status code to be returned to the browser and a redirect to be initialised you need to set the header using the header() method in PHP.

Read more No Comments »

CakePHP empty textbox after bake

This one had me scratching my head. You try to edit a record in your cake bake view but a text box is empty.

Read more No Comments »

CakePHP Notes – A few basics

Recently I’ve set up a laptop at home with Linux Ubuntu, and I’ve been playing with CakePHP over the past month or so. Here are a few basics I’ve noted down.

Read more No Comments »

© 2017 Garry Passarella. All Rights Reserved. Facebook Twitter Twitter