2015-03-02 72 views
0

爲什麼具有該目錄的正確權限的PHP仍然返回FALSE?PHP is_writable返回始終爲假

我已經嘗試過chmod 777到腳本所說的目錄不可寫和chown爲root和apache。

if (!is_writable($destinationFolder)) { 
     throw new Exception('Folder: '.$destinationFolder.' is not writable or does not exists.'); 
    } 

回答

1

試着禁用selinux。

# vim /etc/sysconfig/selinux 

設置'SELINUX = disabled',寫入':wq'。重新啓動apache。