Category Archives: PHP

PHP lesson learnt.. always use the DIRECTORY_SEPARATOR constant

Always use the DIRECTORY_SEPARATOR constant when pointing to files/directories on the server-side. It will make your system more portable. Windows boxes uses backslash as a directory separator while for example Unix uses forward slash. Not using the DIRECTORY_SEPARATOR constant may … Read more

Posted in PHP | 1 Comment

How I implemented currency handling in Mustache across PHP and JavaScript

Originally this article was to be about how to implement currency formatting using the template language Mustache, but I see it also covers a bit on how to synchronize template variables between the server-side and client-side. Hopefully you’ll get something … Read more

Posted in JavaScript, Mustache, PHP, Programming | Leave a comment

Replay search on GosuGamers doesn’t work properly? No problem

Sometimes programming skills become really handy. For example like just now when I tried searching for Warcraft 3 replays including a specific player on GosuGamers. The problem is that it revealed no matches, which is kinda weird because I already … Read more

Posted in GosuGamers, PHP, Warcraft 3 | Leave a comment