acctoff
acctoff

Reputation: 1

function is_dir() in Linux

The is_dir() function doesn't work in my linux system. The directory is as follow:

is_dir("/var/www/html") returns true. But is_dir("/var/www/code") returns false. All the directory is readable. So why this happened? Thanks all!

Addition: The safe_mode in php is off. And the permission of html and code is same. (drwxr-xr-x root root)

Upvotes: 0

Views: 1027

Answers (1)

user9579536
user9579536

Reputation: 11

From php manual:

Note that on Linux is_dir returns FALSE if a parent directory does not have +x (executable) set for the php process.

Upvotes: 1

Related Questions