Get your own PHP server
<!DOCTYPE html>
<html>
<body>

<h2>The __DIR__ Constant</h2>
<p>This constant returns the directory name of the file:</p>

<?php
echo __DIR__;
?>
 
</body>
</html>              

The __DIR__ Constant

This constant returns the directory name of the file:

C:\awesomesites\w3schools\php