How to fix error: the host don’t support “__DIR__”

I see many customers when they install our templates or modules, they get the error :
“Warning: require_once(__DIR__/…) [function.require-once]: failed to open stream: No such file or directory in file php”
“Fatal error: require_once() [function.require]: Failed opening required ‘__DIR__/…'” 

Because their host don’t support “__DIR__”. When you see this error, you can fix in 2 ways:
1. Upgrade your host

2. Find your php file that occur this error, edit: