I have my development machines set up to be able to run sites in any version of PHP from 5.3 through the upcoming PHP 7.2 release, and easily switch between them. This solution uses Apache and real instances of PHP-FPM running on my machine, so there's no virtual machine overheads like with Vagrant. If you want something similar, read on…Read more…
Previously, this blog was written atop the excellent Kohana HMVC framework, and worked perfectly well. Recently, a colleague directed me to Phalcon, which states it is “The fastest PHP Framework”. Bold claims indeed! Since I didn't have any new projects on the horizon, I decided to rewrite my (admittedly very simplistic) blog using Phalcon to see how fast it would run, and also to see how easy Phalcon was to pick up.Read more…
PHP 5.5 was released the other day, and I had a little repo set up to test out some of the new features. I thought I might as well share it, since it didn't take long and might help a few people out. You can view it on GitHub.Read more…
Lately, I've been working a lot with mail scripts, which may use PHP's
mail() function, or in some cases may even talk directly to sendmail. In order to make sure I don't accidentally email any customers, I use Rob Allen's script to reformat emails so they always go to my mailbox, and nowhere else.
I've previously written about absolute and relative paths in web development, and this follow-up post is here to show the method I've been using to get around the problem.
The secret sauce is the old HTML
<base> tag. Simply output this in the
<head> section of your template, with the
I've been working on multiple computers for some time now, and there's one problem that keeps cropping up now and then, and sometimes when going from development to production, or when a folder changes name... Whatever.
/images/file.gif will point to the root, and
file.gif will look in the current directory. The script doesn't always know the path relative to the current document, and it won't (easily) know what directory the images are in from the docroot. So what to do in this case?
var loader = $('img#loader_image').clone(); $('div#visible_loader').append(loader);
Does anyone have a better method for this type of thing? If so, get me on Twitter, at least until I enable comments on my blog.Read more…