Date in hindi format


Some time we need, date in Hindi format, We can show date in Hindi format with Javascript, just use bellow code for it. Here i create two array, first for day name and second for month name in Hindi format. function getYear(), returns current year like 2014,2013…. function getDay(), returns current day like Monday, Tuesday….. function getMonth(), returns current month ... Read More »

create folder in php

When have to upload file in php after create a folder/directory, First check if folder/directory is created or not? To check it use for check any type of file use To create folder use, To give read wirtr permission use on folder To create folder use, 0777 usr for read write permission to folder. Read More »

Rename file name in PHP

When have to upload file in php, always rename file name. If your file containing special characters like #, file could not be open in browser. Some time you upload same file and not rename it, old one is replace with new. To avoid it, rename file name with time() or some unique number. Read More »

Session in PHP

Session is an information which created by server and stored at the server. To start session, use session_start() function at the top of the page, To store value in session, $_SESSION[‘id’]; srore value 1 until session not destroy. When ever we use $_SESSION[‘id’]; it’s result always be 1. Destroy session value, We can also use session_unset(); To free all session ... Read More »

date time in php

In PHP, We use date() function to display date, we have to pass parameter in date() function, according to parameter it display the result. Display Day with date() function:- d => 01 to 31 D => Mon through Sun j => 1 to 31 l => Sunday through Saturday N => 1 (for Monday) through 7 (for Sunday) S => ... Read More »

Mail in codeigniter


To use email in codeigniter, use below code, first load email library by using $this->load->library(’email’);. After it define to,from,subject and message, you can also use cc and bcc. At end use $this->email->send(); to send mail. To debug mail use echo $this->email->print_debugger(); You can set name of sender as $this->email->from(‘’, ‘Your Name’); For repply use $this->email->reply_to(‘’, ‘Your Name’); To create multiple ... Read More »

Scroll To Top