Remove .php extension with .htaccess

You may have noticed that in certain websites don’t have any extension in its Url. Example: It can easily done using  .htaccess files. An .htaccess file is an ASCII file. It is a configuration file for use on web servers running the Apache Web Server software. When a .htaccess file is placed in […]

Continue reading

Date Time in PHP

Date/time is required in almost all the projects. This article is all about how to use date/time efficiently. First thing people often faces is setting timezone. To check default timezone:-



To set timezone After finding timezone, sometime we want to change it.

Example: date_default_timezone_set(‘Asia/Kolkata’);// this will set timezone to’Asia/Kolkata […]

Continue reading

Difference Between Include And Require in PHP

The include or require statement copies all text/code from a specified file into a file that uses require/include statement. Where to use These statements are useful when you want to include same PHP/HTML etc. pages on multiple pages. Example: Header and footer are written in a sperate file, and are included in various pages. Why […]

Continue reading