[英]Codeigniter the files is not uploading in my local.Where as it is working fine in live server
The code is working fine in my live server bbut when i take down the files tom my local where i am using linux with lampp installation it is not uploading the file . 该代码在我的实时服务器上运行良好,但是当我将文件删除到我在本地安装lampp安装Linux的本地文件时,它没有上传文件。
my controller code 我的控制器代码
if ($_FILES['ss_image']['name']) {
$data['ss_image'] = $this->doUpload('ss_image');
}
my doupload method 我的doupload方法
function doUpload($file) {
$config['upload_path'] = './uploads/ss_inventory';
$config['allowed_types'] = '*';
$this->load->library('upload', $config);
if (!$this->upload->do_upload($file))
{
$error = array('error' => $this->upload->display_errors());
$this->global['pageTitle'] = 'Sysops : Upload Inventory ';
$this->loadViews("upload_form", $this->global, $error , NULL);
}
else
{
$data = array('upload_data' => $this->upload->data());
return $data['upload_data']['file_name'];
}
}
View 视图
<div class="form-group">
<label for="ss_image">File input</label>
<input type="file" id="ss_image" name="ss_image">
<p class="help-block">Upload Jpg or png or jpeg </p>
</div>
I have tried changing different views in doupload method but not working 我试图在doupload方法中更改不同的视图,但无法正常工作
在终端中使用ls -l
命令检查目录是否具有写许可权。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.