//File type Checking: $mimes = array(‘application/vnd.ms-excel’,’text/plain’,’text/csv’,’text/tsv’); if(!in_array($_FILES[‘sf_admin_file’][‘type’],$mimes)) { $this->form_validation->set_rules(‘sf_admin_file’, ‘Document’, ‘required’); }
Read MoreCodeIgniter
hash_hmac hash in php
hash_hmac — Generate a keyed hash value using the HMAC method string hash_hmac ( string $algo , string $data , string $key [, bool $raw_output …
Read MoreCodeIgniter HMVC error after updating PHP to PHP 7
CodeIgniter HMVC error after updating PHP to PHP 7:: After updating the php version 5.6 to 7.2 it is showing fatal errors and warnings etc. …
Read MoreFatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in php7
Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in php7 # codeIgniter use mysql_real_escape_string() instead.database connection issue Answer: Use $this->db->escape_str($name); OR $new_name = …
Read MoreOpen and Close a ul after every 3rd li 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 MoreDisable cache in server using htaccess
Disable cache in server using htaccess after refreshing showing same page in Codeigniter, after logout in showing active sessions again in codeigniter, stores in caching …
Read Moreapache – XAMPP installation on Win 8.1 with UAC Warning
Showing in apache – XAMPP installation on Win 8.1 with UAC Warning Question: I am trying to install Xampp win32-1.8.2 on Windows 8.1. I get a …
Read MoreCheck whether url contains http:// or https://
Check whether url contains http:// or https:// if your string is a URL you can use parse_url(), which will return the URL components in an …
Read MoreCheck if image exists in folder or not currupted in php
Check if image exists in folder or not currupted in php:: $full_path = Full Image path; (Like: ../dd/tmp.jpg) if(!file_exists($full_path)){ //Image Not Available or …
Read Morecheck if exists in string in php
check if exists in string in php $a = ‘How are you?’; if (strpos($a, ‘are’) !== false) { echo ‘true’; } OR // returns true …
Read More