define("ROOT PATH", __DIR__); 1

define(“ROOT PATH”, __DIR__);

//in php>5.3
define('ROOTPATH', dirname(__FILE__)); 
//else it's just:
define("ROOT PATH", __DIR__);

Here is what the above code is Doing:
1. It’s defining a constant called ROOTPATH.
2. It’s using the dirname() function to get the directory name of the current file.
3. It’s using the __FILE__ magic constant to get the full path and file name of the current file.
4. It’s using the dirname() function to get the directory name of the current file.
5. It’s using the __DIR__ magic constant to get the full path and file name of the current file.

Similar Posts