a blog by Ben Fallaize
Header image

I’ve been developing in PHP now for 6-7 years. On the latest website I’ve been building are a few little ajax widgets for the shopping cart and such. To accomplish this, I was including a PHP file, the the ajax script was targeting a second script which includes my functions file, then includes the original file.

Today I learnt about the require_once() function in PHP. You can include your functions file wherever you like, but if it’s been called already, it gets ignored. I guess I’ve never had a need for it until now, but another one of those “d’oh” moments.

I was recently introduced to jQuery by a colleague.  5 or 6 years ago, I wouldn’t have dreamed of using javascript to such an extent, but I’m really starting to get into it.  Being able to produce even simple effects with only a few lines of code, that work in all browsers is quite a feat these days, and anything that adds a bit of polish to my websites has got to be a good thing.

Come payday, I will be investing in this: jQuery Novice to Ninja