dedecms有時(shí)候會(huì)提示“Not allow filename for not userdir”,具體解決辦法如下:
v5.6版本的程序請(qǐng)修改include/helpers/common.func.php文件,在里面找到下面的代碼:
else if( !eregi('^http:', $handname) && !eregi('^'.$cfg_user_dir.'/'.$userid, $handname) && !$isadmin )
將其替換為下面的代碼:
else if( eregi('^http:', $handname) && !eregi('^'.$cfg_user_dir.'/'.$userid, $handname) && !$isadmin )
也就是把eregi前面的感嘆號(hào)去掉。
v5.7版本的程序請(qǐng)修改include/helpers/upload.helper.php文件,在里面找到如下代碼:
else if( !preg_match('#^http:#', $handname) && !preg_match('#^/'.$cfg_user_dir.'/'.$userid."#", $handname) && !$isadmin )
將其替換為下面的代碼:
else if( preg_match('#^http:#', $handname) && !preg_match('#^/'.$cfg_user_dir.'/'.$userid."#", $handname) && !$isadmin )
修改完成后就可以了,因?yàn)関5.7版本對(duì)縮略圖作檢查時(shí)程序使用了多條件判斷,導(dǎo)致非管理員級(jí)別的會(huì)員編輯時(shí)出錯(cuò)。