Codeigniter中mkdir创建目录遇到权限问题和解决方法
摘要:今天在用Codeigniter上传文件时(部署在Centos),提示如下错误:Aproblemwasencounteredwhileatte...
今天在用 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创建目录遇到权限问题和解决方法】相关文章:
★ PHP file_get_contents函数读取远程数据超时的解决方法
★ php使用array_search函数实现数组查找的方法