The following behavior is different from the host :
echo 'DIR:' .__DIR__; // DIR:__DIR__
localhost: (works fine):
DIR:C:\Program Files\VertrigoServ\www
why is this other conclusion?
You need PHP 5.3 to use __DIR__
__DIR__
Manual page
In previous versions, instead of dirname(__FILE__) you can use
dirname(__FILE__)
According to PHP constants constants , the __DIR__ constant was only added in php 5.3.0. You are probably using an older version in your host environment.
Try:
<? echo realpath(dirname(__DIR__)); ?>
Folder: localhost or root :)