title: PHP file_put_contents with absolute path?
body: <p>I use Wordpress and PHP and the function file_put_contents(). Wordpress file structure can look different depending on the user.</p>
  
  <p>I need to call it like this:</p>
  
  <pre><code>file_put_contents(TEMPLATEPATH . '/ps_logo2.png');
  </code></pre>
  
  <p>or the same thing like this:</p>
  
  <pre><code>file_put_contents('C:\wamp\www\domain\modehallen.se/wp-content/uploads/images/ps_logo2.png');
  </code></pre>
  
  <p>The case above is the absolute path on localhost (that's why it's C:). I need the path or some other way to make sure the file is put in the right place.</p>
  
  <p>How is this done?</p>