title: Not allowed to load local resource: file:///
body: <p>I have some images in a folder called "Slides" in my project; I am trying to access those images; but it gives me the following error:</p>
  
  <pre><code>Not allowed to load local resource: file:///C:/xampp/htdocs/MyProject/Slides/123_completed.jpg 
  </code></pre>
  
  <p>where is "file://" coming from?! (Probably thats the problem!)</p>
  
  <p>this is my method to scan the images in the folder called "Slides"</p>
  
  <p>the following line of code is in my</p>
  
  <pre><code>$this-&gt;signage_Path = realpath(APPPATH . '../Slides');
  public function get_Signage_Images() {
      $files = scandir($this-&gt;signage_Path);
      $newFiles = array_diff($files, array('.', '..'));
      $images = array();
      foreach ($newFiles as $file) {
          $ext = pathinfo($file, PATHINFO_EXTENSION);
          if ($ext == "jpg") {
              $images[] = array(
                  'url' =&gt; $this-&gt;signage_Path.'\\'.$file,
                  'thumb_url' =&gt; $this-&gt;signage_Path.'\\'.$file,
              );
          }
      }
      return $images;
  }
  </code></pre>
  
  <p>If you need more clarification, please let me know which part!</p>
  
  <p>Thanks</p>