 <pre><code>$dir = realpath(dirname(__FILE__)."/../"); </code></pre> <p>This would be the directory you are looking for. Require files relative to that.</p> <p>To output a different file look at <a href="http://php.net/manual/en/function.readfile.php" rel="nofollow">readfile</a> which outputs straight to the buffer or perhaps use <a href="http://php.net/manual/en/function.file-get-contents.php" rel="nofollow">file_get_contents</a> which can be held in a variable.</p>