Posts filed under “php”
I’ve changed the main archive index template from raw, unformatted month and category lists to something cleaner and slightly 2.0-ier. The monthly links are now arranged into neat rows of months grouped by year (all Kottke-style), and the category list is now a weighted “tag cloud” of links (although strictly speaking, I’m not using MT’s […]
By the way, the travel log still lacks pictures, but that will change soon. Update: Travel log entries with photos now have inline pictures. I’ve spent the past two nights learning how to dynamically resize images in PHP, and image functions are harder than they look at first glance. You would think that it would […]
For later reference: parse_url() – pass it a URL string, and it returns an associative array of URL components. Useful for extracting host names without having to resort to regex.
All day long he had been working with a function which used “printf” commands to produce output from a database query. Simple and effective, but it meant that he was locked into one layout everytime he called that function, and if he needed the data displayed in another format, he would have to make another […]
strftime, I think I love you. How about a date?
Zend Support sent me a fix for my unsaved-preferences problem with ZDE for OS X: Create a folder “~/ZendIDE” (that’s a “ZendIDE” folder in your User Home directory) and put two empty files named “ide2.conf” and “properties2.prp” in it. CHMOD them all 777 and start up ZDE. It worked; ZDE is now saving my preferences […]
The good news is that Zend Studio, an excellent Java-based PHP development environment, runs smooth and fast on MacOS X. The bad news is that it forgets your preferences and key bindings as soon as you exit, so that you have to set them again and remember not to Command-Q when you’re done working.
Right now the cam is pointing outside, watching some skateboarder shred the streets of Little Italy. Noisy kid. Another bit of freeware worth trying: Zend Studio Personal Edition is a free release of their excellent development environment. It’s more than just a text editor — there’s customizable code completion for HTML and PHP, contextual as-you-type […]
I just got a PHP class to send MIME email with attachments up and running, and it feels sooo good. (Of course it took me the better part of a whole workday to figure out that it wasn’t working because I’d forgotten to paste in a whole line of code.) Update: PHPMailer is all you […]
$paulo = array( ‘head’ => ‘hurts’, ‘stomach’ => ‘making weird noises’, ‘fingers’ => ‘hangnails’, ‘mind’ => ‘sleepy’, ‘thinking’ => ‘Why does Mozilla carry inline text properties over into table cells?’ );