title: How to hide download file path from user using php?
body: <p>When user want to download file from my web site, user have to click link like below</p>
  
  <p><a href="https://www.example.com/download.php?aaa=111&amp;bbb=222" rel="nofollow">https://www.example.com/download.php?aaa=111&amp;bbb=222</a></p>
  
  <p>download.php</p>
  
  <pre><code>&lt;?PHP
  session_start();
  include("connect.php");
  $aaa = mysql_real_escape_string($_GET[aaa]);
  $bbb = mysql_real_escape_string($_GET[bbb]);
  if(($aaa = '111')&amp;($bbb = '222'))  // this line is example for ask stackoverflow //
  {
      $filePath_try_to_download = 'attachments_files/test.pdf';
      if(file_exists($filePath_try_to_download)) 
      {
          $fileSize = filesize($filePath_try_to_download);   
          $fileName = "test.pdf";     
          header("Cache-Control: private");
          header("Content-Type: application/stream");
          header("Content-Length: ".$fileSize);
          header("Content-Disposition: attachment; filename=".$fileName);
          // Output file.
          readfile ($filePath_try_to_download);                   
          exit();
      }
  }
  ?&gt;
  </code></pre>
  
  <p>I want to know when user download file from this link <code>https://www.example.com/download.php?aaa=111&amp;bbb=222</code> user can get my file path on server or not (<code>attachments_files/test.pdf</code>). If user can get my file path, how can i hide it's ? (<code>file in this dir is very importance</code>)</p>