PHP - Is there a decent way so that the calling of mkdir creates folders relative to the web root?
<p>The directory and file structure is as follows:</p>

<pre><code>C:\xampp\htdocs\PHP_Upload_Image_MKDIR\uploaded
C:\xampp\htdocs\testA.php // as follows

$userID = 's002';
$uploadFolder = '/PHP_Upload_Image_MKDIR/uploaded/';
$userDir = $uploadFolder . $userID;
mkdir($userDir, 0700);
</code></pre>

<p>If I call testA.php, then the following folder will be created.</p>

<pre><code>C:\PHP_Upload_Image_MKDIR\uploaded\s002
</code></pre>

<p>However, the desired result should be the following:</p>

<pre><code>C:\xampp\htdocs\PHP_Upload_Image_MKDIR\uploaded\s002
</code></pre>

<p>I would like to know a decent method so that the mkdir creates folder relative to the root of the web</p>

<pre><code>C:\xampp\htdocs\
or
C:\wamp\www
</code></pre>

<p>Then in the future, I don't have problems to move this application to a web hosting site.</p>

<p>Thank you</p>
