Its fine for internal script usage to include files.What about path that generates in URL i.e : <a href="http://localhost/mydir/mydir2/abc/myproject/">http://localhost/mydir/mydir2/abc/myproject/</a> OR <a href="http://abc.mydomain.com/mydir/abc/I">http://abc.mydomain.com/mydir/abc/I</a> dont know how wordpress and other cms gets this exactly correct.