Moodle中moodledata的路径为
/nas/wp/www/cluster-40926/securityorg/test_moodle.
代码
$dir = dirname(__FILE__);
echo "Full path to this dir: " . $dir;
输出:
Full path to this dir: /nas/wp/www/cluster-40926/securityorg/test_moodle
但是这会产生一个错误"Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting"
Cluster-40926文件夹不存在我想如果我能把cluster-40926从路径上移除,问题就解决了。
Please help, Thanks in advance
我找不到真正的答案,我重新安装了新版的moodle,问题就解决了。如果有人遇到这个问题,请重新安装模块。
moodle data目录和web文件夹必须分开。此外,moodle数据目录必须在www文件夹之外。
https://docs.moodle.org/27/en/Installing_Moodle Create_the_.28moodledata.29_data_directory