Sep 28, 2015

Codeigniter Installation

Codeigniter installation :

 1. Download the latest codeigniter file from 

2. Unzip the package and move into htdocs(xampp) or Www(wamp)
3. Type the installtion path in URL http://localhost/demo_codeigniter 
4. Change base_url path in config/config.php as http://localhost/demo_codeigniter

5. change the database name, database username, database password and host.
6. change the autoload file in config/autoload.php file .
         Include url in $autoload['helper'] = array('url'); 

7. Then create controller at application/controllers/demo_file.php

8. Create view file at application/views/demo_view.php and load the view file into the controller $this->load->view('demo_view').

9. Run the http://localhost/demo_codeigniter/demo_file.

Sep 24, 2015

codeigniter multiple file upload

public function save_multiple_images()
         for($i=0; $i<$total_items; $i++)
           if(!empty($_POST['item_name'][$i]) && !empty($_POST['item_name'][$i]))
                  $files = $_FILES;
                  $_FILES['userfile']['name'] = $files['item_image']['name'][$i];
                  $_FILES['userfile']['type']= $files['item_image']['type'][$i];
                  $_FILES['userfile']['tmp_name']= $files['item_image']['tmp_name'][$i];             
                  $_FILES['userfile']['error']= $files['item_image']['error'][$i];
                  $_FILES['userfile']['size']= $files['item_image']['size'][$i];
                  $fileName = $_FILES['userfile']['name'];
                 //Calls set upload funtions
                      $upload_data = $this->upload->data();
                      $fileSize = $upload_data['file_size'];
                        echo json_encode($this->upload->display_errors()); exit;
                      $fileName = base_url('files/reward_images/'.$upload_data['file_name']);
                      $fileName = base_url('files/reward_images/no_image.png');
               $reward_image = $fileName;
               $item_id =0;
               $res = $this->rewards_model->save_reward_item($reward_image);
private function set_upload_options($i)
      //upload an image options
      $config = array();
      $config['upload_path'] = './files/reward_images/';
      $config['file_name'] = 'File'.time().$i;
     $config['allowed_types'] = '*'; \
     $config['max_size'] = '52528800';
     $config['overwrite'] = FALSE;
     return $config;

Laravel 5 Installation On Windows

Laravel Installation Steps :

1. Download composer File from 

2. install the composer where the php.exe file located.

3. In command prompt enter the location of project. D:\xampp\htdocs\projects

 4. type in cmd prompt D:\xampp\htdocs\projects > composer create-project laravel/laravel laravel-demo (laravel-demo is your project name).

5. After creating project you have to run the project http://localhost/projects/laravel-demo/public (All public files must reside in this ex. js, css etc.. )

6. You can create controller via composer through cmd prompt D:\xampp\htdocs\projects\laravel-demo> php artisan make: controller controllerName.(like model also can create via same instead of controller we will put php artisan make:model modelName). Note : You can also create a controller manually and model also.

7. After creating controller and model you should create file for view page or folder at
       i. Ex. : index.blade.php (blade is must while create php file)

8. To include external css and html file you should install
          D:\xampp\htdocs\projects > composer require illuminate/html.

 After installed this you have to include in config /app.php under provider :
       i. Illuminate\Html\HtmlServiceProvider::class,

 and in b. Alias :
       i. 'Html' => Illuminate\Html\HtmlFacade::class, 
      ii. 'Form' => Illuminate\Html\FormFacade::class 

To include css like
         { !! Html::style(‘css/style.css’) !! }
To include Js like
         { !! Html::script(‘js/jquery.js’) !! }

 9. Then update the composer via D:\xampp\htdocs\projects > composer update. 

10. You can create a table via migration file. To create migration file via
        D:\xampp\htdocs\projects >php artisan make:migration table_name

11. After creating migration file that resides in database/migrations.
       To create table
       Schema::create('users', function (Blueprint $table) {
        $table->string('full_name', 100);
        $table->string('username', 100);
        $table->string('password', 100);

12. Before creating table you must change the database name, username, password in .env file.

Laravel Framwork

Laravel Framwork:

 Laravel PHP Framework is built with the focus of writing code syntax that is simple and expressive. This will provide the advantage of having a Web Application that is developer friendly and code that is maintainable.

Taylor Otwell created Laravel as an attempt to provide a more advanced alternative to the CodeIgniter framework, which did not provide certain features such as built-in support for user authentication and authorization.

It has been built with a focus of being superior over the other PHP frameworks, with better code foundation, maintainability and more robust features.

 When it comes to code reliability and maintainability, Laravel has a good foundation and great community support behind its PHP Framework.

Sep 6, 2011

Thought for the Day

Thought for the Day

"Before you speak, listen.
Before you write, think.
Before you spend, earn.
Before you invest, investigate.
Before you criticize, wait.
Before you pray, forgive.
Before you quit, try.
Before you retire, save.
Before you die, give."

~ William Arthur Ward

*William Arthur Ward (1921–1994)

Author of Fountains of Faith, is one of America's most quoted writers of inspirational maxims. More than 100 articles, poems and meditations written by Ward have been published in such magazines as Reader's Digest, This Week, The Upper Room, and more.



      Eswaran Arumugam M C A                                    



Aug 25, 2011

Thought for the Day

Thought for the Day

"Books are the quietest and most constant of friends;
they are the most accessible and wisest of counselors,

and the most patient of teachers."

~ Charles W. Eliot



      Eswaran Arumugam M C A                                    



Aug 23, 2011

Thought for the Day

Thought for the Day

"Don't limit a child to your own learning,
for he was born in another time."

~ Rabindranath Tagore

Rabindranath Tagore*Rabindranath Tagore

Born: 7 May 1861 Calcutta, Bengal Presidency, British India
Died: 7 August 1941 (aged 80) Calcutta, Bengal Presidency, British India

An Indian Bengali polymath. He came from a wealthy family of intellects and creative people. He was a popular poet, novelist, musician, painter and playwright who reshaped Bengali literature and music in the late 19th and early 20th centuries. As the first Asian to win the Nobel Prize in Literature, Tagore was perhaps the most widely regarded Indian literary figure of all time. He was a mesmerizing representative of the Indian culture whose influence and popularity internationally perhaps could only be compared to that of Gandhi, whom Tagore named 'Mahatma' out of his deep admiration for him.


      Eswaran Arumugam M C A