PHP is_writable返回始终为假

问题描述:

为什么具有该目录的正确权限的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.'); 
    } 

试着禁用selinux。

# vim /etc/sysconfig/selinux 

设置'SELINUX = disabled',写入':wq'。重新启动apache。