Tag: CodeIgniter
How to change the timezone in CodeIgniter 3.1.6
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 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 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 MoreUndefined property $db in Codeigniter
Severity: Notice Message: Undefined property: CI::$db in codeigniter 3.16 Are you facing any notice saying Undefined property: Home::$db or something like this in your Codeigniter …
Read MoreWhat is Codeigniter?
Sometimes we have simple question in mind.. Some time we heard someone asked this question.. etc. It is very simple , most of us works …
Read MoreCheck whether server is http or https
# Check whether server is http or https if (!empty($_SERVER[‘HTTPS’]) && (‘on’ == $_SERVER[‘HTTPS’])) { $uri = ‘https://’; } else { $uri = ‘http://’; } …
Read Morefind input by name jquery in a form on submit in Javascript
find input by name jquery in a form on submit in Javascript:: $(“#search-form”).on(‘submit’,function(){ var dis = $(this); searchbox = dis.find(“input[name=’product_name’]”).val(); console.log(searchbox); return false; });
Read MoreAltering column size in SQL Server
Altering column size in SQL Server ALTER TABLE table_name ALTER COLUMN column_name datatype; LIKE:: ALTER TABLE `product` MODIFY COLUMN `updatedon` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP …
Read MoreConvert stdClass object to array in PHP
Convert stdClass object to array in PHP The easiest way is to JSON-encode your object and then decode it back to an array: $array = …
Read More