Today, I'll share you about one of my experiment when working with Laravel 4 application: distinguish Request, Route, and Router object of the application instance. All these object play a part in the routing phase, the step that decide which method of which controller will be call on each time the Laravel application run.
Today, I have practiced with the multithread interface of PHP with the support of this POSIX pthreads extension. However, I cannot find a version for my development environment, which is built with VC++ 9.0 compiler in 64-bit system. Therefore, I have built this extension for myself and share it here for any one need it. … Continue reading PHP pthreads extension for windows x64 system
Why I need it? VNI here stands for VNI Encoding, a way to store Vietnamese characters without using Unicode in 1990s ans 2000s. In fact, many Vietnamese old documents used it instead of Unicode. When working with a new web project, a client requires me to build their website with Unicode (of course!) but the … Continue reading PHP – convert Vietnamese character between VNI and Unicode
What is the trouble? Base on CodeIgniter Database class user guide, you can pass a custom string directly to the where clause by the $this->db->where() method. Let see the flowing example, suppose that you have successfully initiated your database. ... $val = 1; $this->db->where("id='".$val."'"); $this->db->get('mytable'); ... You are sure that your table has a field … Continue reading Custom string error in CodeIginter where clause
The pagination and the CodeIgniter framework When you want to present a long list of data, the pagination becomes a useful way to give your users the best interactivity. This makes pagination supported as a class in CodeIgniter framework. Unfortunately, despite of what developers said on the user guide, using this class is not easily … Continue reading How to use Codeigniter pagination
You need this because: Your web server is in a fixed location when your users can be in any country all over the world, Our world doesn't use the same clock but it's divided in to 24 parts called timezones You need to get, manipulate or display current date time between your web server and … Continue reading Convert date time data between php servers and user browsers