date_default_timezone_set() function is used to sets the default timezone used by all date or time functions in core PHP, CodeIgniter etc. # Option-1: In case …
Read MoreCodeIgniter
PHP Sessions across sub domains
User will login or set sessions at auth.domain.com and can use that session all the sub domains of that domain. the session will use across …
Read MoreHow to send a cross domain ajax request
I want to send a cross domain ajax request but I am getting below error. I need to allow others send ajax requests to …
Read MoreCheck if it is on local host or server
Check if it is Localhost or server: function is_localhost() { $whitelist = array( ‘127.0.0.1’, ‘::1’ ); return in_array( $_SERVER[‘REMOTE_ADDR’], $whitelist); } …
Read MoreDownload File in php or codeigniter
Want to download file using php. Here is the sample code. By using it you can download the file in php. you can use it …
Read MorePhp Code Encoding Benefits or which Encoder do I Need?
Php Code Encoding Benefits or which Encoder do I Need? Encoding Benefits PHP scripts can be easily read, changed and run on any PHP enabled …
Read MoreDownload File in php
Download File in php function. Force Download. Here, $filepath = File Full path, where the file exists. $filename = File name of the file , which …
Read Moreon every third block ul tag will close and new tag open in php
<!DOCTYPE html> <html lang=”en”> <head> <title>Bootstrap Example</title> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css”> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <script …
Read MoreChange Server url dynamically for xampp or LIVE server in php
Here, whitelist array contains all the ip address that we uses for xampp or Local server. All all local ip address in the whitelist array …
Read More