title: How to open PDF file with Pdf.js viewer after some PHP codes executing? (without ?file=URL_PDF)
body: <p>I don't know my question title is enough good or not.</p>
  
  <p>I am tried to build pdf viewer in my website with PDf.js. I know, normally it's simple as:
  <a href="http://example.com/pdfjs/web/viewer.html?file=PDF_URL" rel="nofollow noreferrer">http://example.com/pdfjs/web/viewer.html?file=PDF_URL</a></p>
  
  <p>But my claim is - Pdf url dont show in the address bar.
  I was created view.php from viewer.html codes. And I want like this:
  <a href="http://example.com/pdfjs/web/view.php?file=1" rel="nofollow noreferrer">http://example.com/pdfjs/web/view.php?file=1</a></p>
  
  <p>So in my php page I check database and fetch fileurl from ID=1. </p>
  
  <p>and finally I want to set Pdf.js viewer for to open my pdf from Fileurl.
  But I cant. I am lost much time for this, googling for hours, but I cant unfortunately.</p>
  
  <p>What can I do? Or what can I do for getting like this result? Or with .htaccess is it like this possible?
  (sorry for my low quality English)</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  // my view.php
  
  if(isset($_GET['file'])){
    $file = mysqli_real_escape_string($db, @$_GET['file']);
  }else{
    $file="";
  }
  
  if(is_numeric($file) AND $file!=""){
    $query = mysqli_query($db, "select * FROM pdf_files WHERE id='$file' ");
       if(mysqli_num_rows($query) == 1){
          $result = mysqli_fetch_assoc($sorgu);
          $filepath = $result['filepath'];
  }
  
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;head&gt;
    &lt;link rel="resource" type="application/l10n" href="locale/locale.properties"&gt;
    &lt;script src="../build/pdf.js"&gt;&lt;/script&gt;
    &lt;script src="viewer.js"&gt;&lt;/script&gt;
    &lt;script src="https://code.jquery.com/jquery-3.3.1.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;!--Other Pdf.js viewer.html codes--&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now when I am going to <a href="http://example.com/pdfjs/web/view.php?file=1" rel="nofollow noreferrer">http://example.com/pdfjs/web/view.php?file=1</a> ,</p>
  
  <p>PdfJS giving error like this:
  Message: Missing PDF "<a href="http://example.com/pdfjs/web/1" rel="nofollow noreferrer">http://example.com/pdfjs/web/1</a>".</p>