dirname(__ FILE__)返回“/ nfs”路径

I'm trying to get the directory name using this:

$d = dirname(__FILE__);

But it returns a NFS path. Anyone knows why it is happening? My co-worker says that the NFS is off in the server.

To check independently of your PHP script, where __FILE__ really is, you can use

realpath /path/of/your/__FILE__

in a shell on the server.

Then, to tell, if it is an NFS file system, you can do:

stat -f -L -c %T /realpath/of/__FILE__

Probably your sysadmin moved the files to the path where the NFS was mounted before and symlinked them to the place where you access them.