Posted in PHP onJuly 25, 2014
今天在用 Codeigniter 上传文件时(部署在 Centos),提示如下错误:
A problem was encountered while attempting to move the uploaded file to the final destination.
相关代码:
//目录检测 if (!is_dir($cache_path)) mkdir($cache_path, '777');
修改为如下代码既解决问题:
//目录检测 if (!is_dir($cache_path)) mkdir($cache_path, 0777);
Codeigniter中mkdir创建目录遇到权限问题和解决方法
- Author -
junjie声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@