简体   繁体   English

Codeigniter文件未在我的本地上载。在实时服务器中运行正常

[英]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.

相关问题 从本地服务器上载Codeigniter网站到现场 - Uploading codeigniter site from local server to live 我的codeigniter webapp有问题,它在我的本地主机上工作正常但在实时服务器上没有 - I have problems with my codeigniter webapp it works fine on my local host but not on live server 网址未在实时服务器上解析,在本地服务器上正常运行 - Url not resolved on live server, working fine on local codeigniter sql 备份在本地服务器中工作正常,但在实时显示错误 - codeigniter sql backup works fine in local server but in live it shows error 为什么 CodeIgniter 中的重定向功能在实时服务器上不起作用,但在 localhost 上运行良好 - Why in CodeIgniter redirect function is not working on live server, but working fine on localhost 我的登录脚本在localserver上工作正常,但它不能在实时服务器上运行 - My login scripts working fine on localserver but it not working on live server 笨。 Web应用程序在本地工作正常,但在实时服务器中它只加载主页 - Codeigniter. Web app works fine in local but in live server it only load the home page 无法在Codeigniter中上传多个文件 - Multiple files uploading not working in Codeigniter 在实时服务器上,CodeIgniter不上传任何图像 - CodeIgniter not uploading any image when on live server 文件上传在实时服务器上不起作用 - File uploading is not working on live server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM