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.
Also 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
已解决-权限在父目录上是不够的,不确定它是怎么来的,我在所有目录上将它们设置为775,也许在重新安装时
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.