title: TCPDF server sent different file name
body: <p>I tried to re-organize the TCPDF directories but every time I end up with lots of problem so I decided to stick with default one so my php file is</p>
  <pre><code>xxx.net/pdfgen/lib/examples/index.php
  </code></pre>
  <p>at the end of my code I have the following lines to save the generated file into the server as well</p>
  <pre><code>global $filetitle ; $filetitle = rand(0,9999);
  $pdf-&gt;Output($filetitle, 'I');
  $pdf-&gt;Output(dirname(__FILE__).'/../../'.$filetitle.'.pdf', 'F');       
  </code></pre>
  <p>if I run the file at this location, all is fine, but considring the long and ugly path, I decided to include it in another php file in upper directory</p>
  <pre><code>xxx.net/pdfgen/index.php
  include('lib/examples/index.php');  
  </code></pre>
  <p>if I open the new file I end up with a message saying</p>
  <blockquote>
  <p>server has sent different file name, do you want to accept it or not and that file indicates the function &quot;rand&quot; has re run again and generated new numbers and at the end two files are generated each time.</p>
  </blockquote>
  <h1>Any idea how that could happen?</h1>