title: How to get access outside HTDOCS with PHP script
body: <p>I have a webserver with Apache.</p>
  
  <p>For security reasons my customer wants to access files (.jpg/.pdf/.png/.gif) in another folder.</p>
  
  <p>The root layout is as follows:</p>
  
  <ul>
  <li>backup </li>
  <li>data</li>
  <li>etc</li>
  <li>htdocs</li>
  <li>logs</li>
  <li>tmp</li>
  </ul>
  
  <p>In the htdocs folder the Joomla website resides. I use flexicode to add PHP code to the site.</p>
  
  <p>Is there a way I can show for example a photo in .jpg from the data folder?
  example. /data/werknemers/80111/pasfoto.jpg</p>
  
  <p>There is a little snag. Everybody uses a pin number to log into Joomla. In this case pin 80111.
  Pin 80111 is added to the users table, the field is called pin.</p>
  
  <p>Is it possible to use a variable to retrieve the data? So only user 80111 can access his or her folder and not another one?</p>
  
  <p>The photo is shown in a module on the website after login.</p>
  
  <p>Cheers,</p>
  
  <p>Steve</p>