PHP dirname(__FILENAME__) Function

PHP dirname(__FILENAME__) Function

The php function dirname(__FILENAME__) is used to get the working directory for files and include files.

The code below can be used to see how the function works.

$dir = dirname(__FILENAME__); 
echo $dir;