title: Absolute path without symlink resolution / Keep user in home directory
body: <p>Is there a way in PHP how to determine an absolute path given a relative path without actually resolving symlinks? Something like the <code>realpath</code> function but without symlink resolution.</p>
  
  <p>Or alternatively, is there some easy way to check whether user (who uses my browsing PHP script to view files) did not accidentally step out of Apache virtual host's home directory? (or disallow him to use the nasty . and .. in paths)</p>
  
  <p>Thanks!</p>