title: Codeigniter - dynamically getting relative/absolute path outside of application folder
body: <p>I am attempting to have a temporary cache folder of sorts just outside of and at the same level as the application folder. This is for storing images for a couple moments before moving them off-site.</p>
  
  <p>I am trying to get a user's Facebook profile image and save it to my server. I have an image storage solution which requires me to take the photo, and rename it then pass it to the respective location for storage. My thoughts were using <code>file_get_contents()</code> and <code>file_put_contents()</code> I could store this file for a moment while processing it accordingly and then copy/move it to my storage method. However I do not wish to have the temp directory inside of the application folder - I want to have it at the same level as the application and system folder. My problem is accessing a relative path or absolute path (at the same level of the application folder) without hardcoding it.</p>
  
  <p>Using <code>(__dir__)</code>, <code>(__file__)</code>, and something like <code>realpath(APPPATH)</code> only gives me results within the application folder. So I am hoping someone else knows a way to achieve this</p>