title: codeigniter Undefined property: Introduce::$upload error
body: <p>here is my file upload process</p>
  
  <pre><code>// file upload process      
  
  
  $config['upload_path'] = UPLOAD_PATH ."/introduce/";
      $config['allowed_types'] = UPLOAD_ALLOW_EXT;
      $config['max_size'] = '10240';
      $config['file_name'] = time();                  
      $this-&gt;load-&gt;library('upload', $config);
  
      foreach($_FILES as $key =&gt; $value) 
      {
          if($_FILES[$key]['name'])
          {       
              if (!$this-&gt;upload-&gt;do_upload($key)) 
               {
                  var_dump($this-&gt;upload-&gt;display_errors());
                  alert('erro while file upload');
              } else {
                  $upload_data = $this-&gt;upload-&gt;data();
                  ${$key} = $_FILES[$key]['name'];
                  ${"o".$key} = $upload_data['file_name'];
              }
          }
      }
  </code></pre>
  
  <p>I have same code.
  worked in "<strong>/controller/1.php</strong>" 
  deosn't work in "<strong>/controller/2.php</strong>" </p>
  
  <p><strong>error massage</strong></p>
  
  <blockquote>
    <p>A PHP Error was encountered Severity: Notice Message: Undefined
    property: Introduce::$upload Filename: admmode/introduce.php Line
    Number: 77</p>
    
    <p>Fatal error: Call to a member function do_upload() on a non-object in
    /var/www/html/application/controllers/admmode/introduce.php on line 77</p>
  </blockquote>