开发者

php file_exists of a path makes no sense

in my drupal module code i check if a path exists but the condition is not true even the path is there

// for debugging
$con .= $path;
$con .= "<br>";
$con .= strval( file_exists($path) );
$con .= "<br>";
$con .= strval( is_dir($path) );
$con .= "<br>";
// end debug

if (file_exists( $path )) {
    // do bla
}

i read http://de3.php.net/manual/de/function.file-exists.php and tried to clearstatcache() before but no change.

开发者_如何学PythonAlso tried with a standalone php snippet which works fine!

<?php
$path = '/mnt/dataC/ebook';
$con = '';
$con .= strval( file_exists($path) );
$con .= strval( is_dir($path) );
echo $con;
?>

output: 11

the path is an external usb drive.

/dev/sdf1 on /mnt/dataC type reiserfs (rw,noexec,nosuid,nodev)

reinstalling modules and clearing drupal cache doesnt help either


SOLVED - permissions did not suffice on a parent dir, not sure how it came, i set them to 775 on all dirs, maybe on remount

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜