February 19, 2005

auto_prepend_file

You learn new things everyday, even in areas where you are vastly familiar. I remember discovering the include_path php directive a few years ago and how that made programming my sites so much easier. You didn't need to worry about how deep into a directory structure you were, the include and require statements would find the library files you were looking for. Definitely made ones code more portable — something that my early work was not.

I should have read that list of directives more carefully at that point, because nestled among the useless and benign were two gems: auto_prepend_file and auto_append_file which will make my life that much simpler. These directives allow you to specify per directory with the .htaccess file any scripts that you want included before and/or after the main page executes. Not only does this mean you can have your libraries in one convenient location, but you don't need to include them manually on each page. According to the manual, these specified files are included using the include() call. So you may not want to directly include any important libraries — instead include a file which in turn calls require_once() for each of your important libraries.

The format of the entry for these directive in the htaccess file is as follows: php_value auto_prepend_file "/path/to/file.inc"

Posted by rhuvok @ 21:32 // Permanent URI
Filed under Geek, Web

Artwork of sorts

daffodil slice Last night I decided to try my hand at creating something other than a head in Photoshop. Fueled by my renewed interest in my pen tablet, I decided that I might pick up my old past time of drawing with pastels and attempt to emulate that on the computer. The image above is a mere slice of the whole deal, but I think that I did a pretty decent job with it. It is a different medium to work in, but fortunately a bit more forgiving than chalks and pastels. (And less messy.)
Posted by rhuvok @ 21:00 // Permanent URI
Filed under Art


Copyright © 2001-2012. Colin Bate.