title: Display images on site from folder outside public_html folder
body: <p>I am using codeingiter and had a image directory in it. Due to space issue I have shifted the entire directory to new location on same server.</p>
  
  <p>Earlier path was /var/www/html/site_folder/assets/images</p>
  
  <p>New Location is /home/new_site/images</p>
  
  <p>Now when I want to display images on web site its not getting load.</p>
  
  <p>I have tried using the below code </p>
  
  <blockquote>
    <p>$file = '/home/new_site/images/3.jpg';</p>
    
    <p>header('Content-Type: image/jpeg');</p>
    
    <p>echo "&lt;img src='".readfile($file)."' &glt;";</p>
  </blockquote>
  
  <p>I have approximately 50 images and I want to load them on my site.</p>
  
  <p>This works on local but not on server. I am using <strong>Linux</strong> on local and <strong>Centos</strong> on server.</p>