Nginx+PHP(FPM)+MySQL+Memcache+eAccelerator on Debian6

I recently rebuild my linux image on Linode, so I have to reinstall the LEMP stack again from ground. Last time was probably more than a year ago, with the help of many tutorials from google. So this time I decide to write what I did step by step for my reference in the future. I am using Debian 6 32bit with linux kernel 3.0.4. After first log in to your debian, first you want to add Dotdeb repository to …
Read More

Posted in Linux | Tagged , , , , | Leave a comment | 86 Views

QR Code Generate Class in PHP

A QR code (short for Quick Response) is a specific matrix barcode (or two-dimensional code), readable by dedicated QR barcode readers and camera phones. The code consists of black modules arranged in a square pattern on a white background. The information encoded can be text, URL or other data. QR code is pretty efficient in spreading messages to smartphone devices. You can use your iphone, ipad, android phone or other smartphones to scan the code anywhere, then you would be …
Read More

Posted in PHP | Tagged , , , , | Leave a comment | 99 Views

Simple snippet to get file extension in php

Following is a simple snippet I use to get a file extension in php, notice that the strrpos function returns the last position of the string “.” in filename in case there are multiple dots in file name. <?php /** * Function that returns file extension by its name. * @param unknown_type $fileName * @return $ext */ function fileExt($fileName) { /* sttrpos to get last position of “.” */ $dot = strrpos($fileName, ‘.’); if($dot === FALSE) return FALSE; $ext = …
Read More

Posted in PHP | Tagged , | Leave a comment | 114 Views

Hello world!

Welcome to WordPress. This is my first post. Read or comment on it, then start surfing!

Posted in Wordpress | 1 Comment | 86 Views