title: Use of undefined constant ABSPATH
body: <p>I am using WP for the first time. I'm just trying to create a very basic script to echo the user's id and am having all sorts of issues.</p>
  <p>The code is this and is currently located in wp-content/plugins (i'm not really sure where these things should be):</p>
  <pre><code>&lt;?php
  require_once ABSPATH . '/wp-includes/pluggable.php';
  $user = wp_get_current_user();
  echo $user-&gt;get_site_id();
  </code></pre>
  <p>I'd had it without the require initially but I was getting a <code>function not defined</code> error for <code>wp_get_current_user</code>. Now I'm getting <code>Warning: Use of undefined constant ABSPATH - assumed 'ABSPATH'...</code></p>
  <p>Is there some sort of predefined set of files that I need to include or some specific directory I need to be putting my scripts so that these variables and functions are in scope? My understanding was that these things are supposed to be global.</p>