Posts

Showing posts with the label Codeigniter

Simple Jquery Ajax Alongside Codeigniter (Video Tutorial)

Image
I flora this screencast spell i was searching to larn Jquery in addition to Ajax integration. It help me a lot to empathise basic in addition to was able to implement inward my project. You tin persuasion the screencast inward below URL Author conduct maintain broken it downward to iv parts. This offset 1 explains on how tardily Jquery tin last to setup in addition to to a greater extent than or less tools you lot heed honor usefull. simple-jquery-ajax-with-codeigniter-part-1/ Following on from component 1 inward this screencast writer exhibit near Ajax functions $.get. We volition conduct maintain a hold off at how to perfom a $.get asking in addition to how to handgrip the callback. simple-jquery-ajax-with-codeigniter-part-2/ So straightaway nosotros conduct maintain looked at the $.get asking nosotros straightaway are going to hold off at the $.post request. In this screencast nosotros tin encounter how nosotros tin submit shape information through this ...

How To Provide View’S Every Mo Information Inwards Codeigniter?

View’s tin dismiss travel returned every minute information amongst a tertiary parameter ( setting to TRUE) every minute follows $output = $this->load->view('view', $data, TRUE); You tin dismiss usage this selection for many purposes. I accept used it for constructing downloads too to choose handgrip of too impress consummate html template. You tin dismiss used it to build PDFs amongst the assistance of about custom libraries or function. Sumber http://developer-paradize.blogspot.com

Flushing Codeigniter's Cache Or Deleting Caches Inward Codeigniter

Image
Enabling together with deleting caches inward Codeigniter is fairly straightforward together with easy. In this post, I am writing near deleting caches. You no longer involve to delete caches manually inward Codeigniter 2.x version. If yous no longer want to cache a file inward Codeigniter yous tin destination take away the cache files. Following are 2 methods to create it. Clearing all cache You tin destination clear the entire cache directory past times calling $this->output->clear_all_cache(); Note: This volition non take away the .htaccess together with index.html files inward the applications/cache folder. //Clears all cache from the cache directory $this->output->clear_all_cache(); This method returns NULL. Clearing a cached path You tin destination clear whatever specified path of its cache past times calling following method. //Clears the cache for the specified path $this->output->clear_path_cache($uri);  This meth...

A Bootstrap For The Codeigniter Php Framework

Image
The Template library written for the CodeIgniter PHP-framework using pop bootstrap. Check out @ https://github.com/aliasproject/CodeIgniter-Bootstrap Sumber http://developer-paradize.blogspot.com

Create Jquery Ajax Alongside The Codeigniter Pagination Library Video Tutorial

In this screencast you lot are going to larn how to combine Jquery Ajax amongst the Codeigniter Pagination Library. Note: I bring wrote an article concluding calendar week amongst consummate root code on "How to implement jQuery Ajax amongst Codeigniter pagination library together amongst bootstrap styling". Click the next link to stance the article. How to role Codeigniter pagination library together amongst jQuery too AJAX amongst consummate sourcecode?  Ref: http://blip.tv/web-lee/codeigniter-pagination-part-4-2245514 Sumber http://developer-paradize.blogspot.com

Using Mongodb Alongside Codeigniter - Nosql

MongoDB is document-oriented NoSQL database. What is NoSQL? NoSQL is a sort of database that, different most relational databases, does non supply a SQL interface to manipulate data. NoSQL databases commonly organize the information inward a different fashion other than tables. NoSQL databases are divided into 3 categories: column-oriented, key-value pairs, together with document-oriented databases. SQL based relational databases create non scale good when they are distributed over multiple cluster nodes. Data partitioning is non an slow to implement solution when the applications purpose bring together queries together with transactions. NoSQL databases are non new. Actually, at that spot were key-value duo based databases earlier relational database became popular. What is a document-oriented database? For document-oriented databases, a document is a information construction that has variable give away of properties. Each holding has a value that tin laissez passer on...

How To Operate Codeigniter Pagination Library Together Alongside Jquery Together With Ajax Alongside Consummate Sourcecode?

Image
I accept used Codeigniter's pagination library together amongst twitter bootstrap(for styling pagination), Handlebars script(to arrive at html template) in addition to jQuery(to arrive at dynamic pagination via ajax). Customized Bootstrap pagination vogue for Codeigniter pagination library It volition live really tardily to empathize the next code if you lot are expert at Codeigniter, twitter bootstrap, jQuery in addition to Handlebars script. Handelbars :Handlebars provides the ability necessary to allow you lot build semantic templates effectively amongst no frustration. Click here to read to a greater extent than virtually what is Handelbars in addition to how it works? This is working trial which I accept used inwards i of my project. If you lot notice whatsoever bug, allow me know. Or whatsoever feedback volition live appreciated. I accept included Model, View, Controller in addition to jQuery. Hope individual volition relieve a lot of time. You tin extend the scr...

How To Update A Joined Tables Using Codeigniter's Active Record?

Codeigniter active tape doesn't let to update a joined tables. After trying diverse method as well as searching the solution, I accept institute the next solution which does the precisely same affair i.e. update the multiple bring together tables. By using next method, you lot tin update multiple tabular array using codeigniter active record. $this->db->set('a.firstname', 'Pekka'); $this->db->set('a.lastname', 'Kuronen'); $this->db->set('b.companyname', 'Suomi Oy'); $this->db->set('b.companyaddress', 'Mannerheimtie 123, Helsinki Suomi'); $this->db->where('a.id', 1); $this->db->where('a.id = b.id'); $this->db->update('table every mo a, table2 every mo b'); Sumber http://developer-paradize.blogspot.com

How To Become All Post Information Inward Codeigniter

Before you lot bring to create this long ho-hum trend to choke all the postal service datas using Codeigniter. $post = array(); foreach ( $_POST equally $key => $value ) { $post[$key] = $this->input->post($key); } var_dump($post); Since CI 2.1.0, you lot tin forthwith create the next tardily trend to choke all postal service information from the form. $data = $this->input->post(NULL, TRUE); // returns all POST items amongst XSS filter $data = $this->input->post(); // returns all POST items without XSS filter This tin survive handy if you lot bring dynamically built bird amongst a lot of fields too can't define each field's name. With this method you lot tin choke all postal service information from the form. Sumber http://developer-paradize.blogspot.com

How To Get Mistake 324 (Net::Err_Empty_Response) Inwards Codeigniter

As many unlike factors drive Error 324 (net::ERR_EMPTY_RESPONSE), at that spot is no 1 respond for everyone. Here is my occupation as well as how I fixed the Error 324. Problem Description : I downloaded a fresh re-create of Codeigniter Version 2.1.3 as well as travail to access welcome message page exactly I croak on getting Error 324 ERR_EMPTY_RESPONSE inwards my browser (chrome) as well as inwards the other browsers i got blank (white screen) page." Solution : I cleared the cache from browser. And I restarted the MAMP server. And it worked similar charm inwards all browsers. :) Hope this volition assistance you lot every mo well. Sumber http://developer-paradize.blogspot.com

Removing The Index.Php File From Url Inward Codeigniter

By default, the index.php file volition survive included inwards your URLs: example.com/index.php/news/article/my_article You tin easily take away this file yesteryear using a .htaccess file amongst simply about uncomplicated rules. RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ index.php?/$1 [L] This htaccess dominion is footling dissimilar than dominion y'all tin honor inwards Codeigniter's ain website. When I used the codeigniters htaccess rule, it didn't worked. After searching the solution I works life inwards a higher house solution. It worked. :) Sumber http://developer-paradize.blogspot.com

Contact Course Of Written Report Using Jquery Validation, Codeigniter Together With Bootstrap

Image
I accept used Jquery validation plugin for validation, bootstrap for styling HTML too Codeigniter to transportation the email. I accept posted the consummate rootage code too covert dump of lastly outcome. Feel costless to utilisation it. :) Bootstrap Contact form  Form built amongst Twitter Bootstrap <style type="text/css"> label.valid { width: 24px; height: 24px; background: url(../img/valid.png) take in centre no-repeat; display: inline-block; text-indent: -9999px; } label.error { font-weight: bold; padding: 2px 8px; margin-top: 2px; } </style> <div class="container-fluid"> <div class="row-fluid"> <div class="span9 offset3"> <form action="" id="contact-form" class="form-horizontal" method="post"> <fieldset> <div class="control-group"> <label class="control-label" for="name">Your Name</label> ...

Creating A Cronjob Alongside Codeigniter

You demand cronjob to accomplish many things. For example, if you lot demand to reset/update the database every 30min or 1 hour, you lot demand cronjob. First practice a controller inwards the folder application/controller/. I practice a controller similar this application/controller/crontodo.php cast Crontodo extends CI_Controller{ business office __construct() { parent::__construct(); //load the model $this->load->model('cronjob_model','',TRUE); } business office index() { $this->cronjob_model->my_cronjob(); } } The side past times side 1 is to practice the model every bit application/models/cronjob_model.php cast Cronjob_model extends CI_Model { business office __construct() { // Call the Model constructor parent::__construct(); } business office my_cronjob(){ // hither you lot should add together what you lot wanna practice amongst cronjob such every bit drop, create, add, delete. update etc ...

How To Empty Or Truncate Mysql Tabular Array Using Codeigniter Active Record?

If you lot desire to empty or truncate a mysql tabular array using Codeigniter active record, role the next code. To empty $this->db->empty_table(); This volition generate a delete SQL string too runs the query. // DELETE FROM mytable To truncate $this->db->from('mytable'); $this->db->truncate(); // or $this->db->truncate('mytable'); This volition generate a truncate SQL string too runs the query. // TRUNCATE mytable Source: http://www.learnhow2do.com/computer/internet/2013/04/13/learn-how-to-empty-or-truncate-table-using-codeigniter-active-record/ Sumber http://developer-paradize.blogspot.com

How To Railroad Train P3p Headers Inwards Codeigniter?

What is P3P header? The Platform for Privacy Preferences Project (P3P) is a protocol allowing websites to declare their intended role of data they collect close spider web browser users. Designed to hand users to a greater extent than command of their personal data when browsing, P3P was developed past times the WWW Consortium (W3C) in addition to officially recommended on Apr 16, 2002. If y'all didn't gear upward P3P header, it may non hold upward properly inward IE browsers. Real basis work in addition to solution example Problem: My codeigniter application is trying to gear upward cookies from within an iFrame, in addition to this is non working really good alongside IE8. Solution: Add P3P headers IE's "high" privacy setting blocks all cookies from websites that produce non accept a compact privacy policy, simply cookies accompanied past times P3P non-policies similar those below are non blocked. In fellowship to gear upward the P3P header inward C...

Php Twine Functions For Ship Service Too Give-Up The Ghost Asking Using Codeigniter

Install the whorl library from https://github.com/philsturgeon/codeigniter-curl CodeIgniter-cURL is a CodeIgniter library which makes it slow to exercise uncomplicated cURL requests together with makes to a greater extent than complicated cURL requests easier too. //load the Curl library $this->load->library('Curl'); //Request using POST Method $url = 'http://postexample.com/json.php'; echo $this->curl->simple_post($url, false, array(CURLOPT_USERAGENT => true)); //Request using GET Method $get_url = http://getexample.com/json.php; echo $this->curl->simple_get($get_url, false, array(CURLOPT_USERAGENT => true)); It is really of import to gear upwards CURLOPT_USERAGENT, otherwise many servers may turn down your asking if yous don't larn out user agent. //PHP version, yous tin travel lay anyvalue for CURLOPT_USERAGENT, merely it shouldn't hold upwards empty or blank. curl_setopt($ch, C...

How To Upload Multiple Files Using Codeigniter ?

This is simply an extension to the existing Codeigniter's Upload flat to accept wages of multiple uploads inwards i shape field. Installation Copy MY_Upload.php to your application/libraries directory. If y'all are using a prefix other than MY_ for your classes and/or choice file paths, conform accordingly. Usage Load the Upload flat equally usual, inwards your controller telephone band the component do_multi_upload(). If y'all are uploading a unmarried file, it'll default to the regular do_upload() method. In the form, laid plain names to array (e.g. name="userfile[]") MY_Upload.php <?php if ( ! defined('BASEPATH')) exit('No straight script access allowed'); /** * Exenstion File Uploading Class */ flat MY_Upload extends CI_Upload { world component do_multi_upload( $field = 'userfile', $return_info = TRUE, $filenames = NULL ){ // Is $_FILES[$field] set? If not, no argue to continue. if ( ! isset($_FILES[$fiel...

Swedish Linguistic Communication Degree Validation Back Upward For Codeigniter 2.1.X

I accept translated the degree validation into Swedish Language of CodeIgniter Version 2.1.X. This volition hold upwards useful when you lot are adding multi-languages back upwards inwards Codeigniter 2.1.x. This volition assistance you lot to demo degree validation rules inwards Swedish Language. Just add together next form_validation_lang.php nether application/language/swedish folder. <?php $lang['required'] = "%s är obligatoriskt."; $lang['isset'] = "%s måste innehålla ett värde."; $lang['valid_email'] = "%s måste innehålla en giltig e-post."; $lang['valid_emails'] = "%s måste innehålla all giltig e-poster."; $lang['valid_url'] = "%s måste innehålla en giltig URL."; $lang['valid_ip'] = "%s måste innehålla en giltig IP."; $lang['min_length'] = "%s måste innehålla minst %s tecken."; $lang['max_length'] = ...

How To Laid Upwardly Global Constants Containing Arrays Using Codeigniter?

You tin role Codeigniter's constants file to shop global arrays which tin hold upwardly used inwards multiple controllers or whatever where inside your codeigniter's projection scope. Problem: Apparently, constants can't concord arrays. Solution: You tin serialize your array in addition to and thence position it into the constant. For example, # define constant, serialize array define ("FRUITS", serialize (array ("apple", "cherry", "banana"))); # role it $my_fruits = unserialize (FRUITS); You tin shop it every moment a JSON string inwards a constant. And application indicate of view, JSON tin hold upwardly useful inwards other cases. define ("FRUITS", json_encode(array ("apple", "cherry", "banana"))); $fruits = json_decode (FRUITS); var_dump($fruits); It may exists other efficient ways to shop global arrays inwards Codeigniter. Suggestions volition hold upwardly appreciat...

How To Add Together Multiple Languages Back Upwards Inward Codeigniter ?

CodeIgniter comes amongst multi-language support, too known every bit internationalization which enables us to dynamically introduce our application’s interface inwards dissimilar languages without duplicating the existing root code for each language. Configuring Multi-Language Support First nosotros bespeak to configure the necessary files before nosotros tin start using linguistic communication support. The CodeIgniter config file, located inwards the application/config directory, contains an pick called linguistic communication which defines the default linguistic communication of the application. <?php $config['language'] = 'english'; CodeIgniter allows you lot to driblet inwards every bit many languages every bit you lot desire inwards the ../application/language/ folder. For example, if I wanted to add together back upwards for Swedish, I would practise a folder within linguistic communication called "swedish". All linguistic communication ...