php is_file 总是返回 false
[apache@h185 default]$ ls -l /home/www/default/p.php
-rwxr-xr-x. 1 zhouhh zhouhh 50837 Aug 28 19:02 /home/www/default/p.php
[apache@h185 default]$ ls -l /usr/bin/rrdtool
-rwxr-xr-x. 1 root root 24688 Aug 21 2010 /usr/bin/rrdtool
[apache@h185 default]$ ls -l /root/my.cnf
ls: cannot access /root/my.cnf: Permission denied
[apache@h185 default]$ ls -l /usr/bin/ld
-rwxr-xr-x. 1 root root 594968 Jun 22 22:06 /usr/bin/ld
[apache@h185 default]$ ls -l /usr/bin/php
-rwxr-xr-x. 1 root root 3224944 Jul 4 00:57 /usr/bin/php
[apache@h185 default]$ vi test.php
[apache@h185 default]$ cat test.php
<?php
#if(is_file('/home/www/default/p.php'))
#if(is_file('/usr/bin/rrdtool'))
#if(is_file('/root/my.cnf'))
#if(is_file('/usr/bin/ld'))
#if(file_exists('/usr/bin/ld'))
if(is_file('/usr/bin/php'))
{
print 'ok';
}
else
{
print 'no ok';
}
?>
[apache@h185 default]$
除了第一行返回 true,其他行总是返回 false。但是这个文件都存在。/root/my.cnf 不能访问,其他文件可以执行和读取。
如何解决这个问题呢?