Codeigniter invalid upload path

后端 未结 5 1267
臣服心动
臣服心动 2021-01-28 16:15

Guys below is given code and folder structure. Anyone can please help me why it appearing \"The upload path does not appear to be valid.\" error? How can I reso

相关标签:
5条回答
  • 2021-01-28 16:20

    In you config

    $config['upload_path'] = './uploads/414208';
    

    it seems it cannot find directory named "uploads", this might be case sensitive and as ive been seeing in your Folder Structure you have Upload directory. You might want to rename your upload directory from "Upload" to "uploads" or change config upload path to './Upload/414208'

    0 讨论(0)
  • 2021-01-28 16:23

    your folder name is Upload and you are writing 'upload'U must be capital

    0 讨论(0)
  • 2021-01-28 16:24

    This is because your folder name is "Upload" and you are using "uploads" in your upload_path

    $config['upload_path'] = './Upload/414208/';
    
    0 讨论(0)
  • 2021-01-28 16:30

    As your upload location is outside of your application folder, something like this should work:

    $config['upload_path'] = realpath(dirname(__FILE__)). '/Uploads/414208/';
    

    if you decide to move your upload location within your application folder, then you can use APPPATH instead of realpath. If you use APPPATH, please note that it will have a trailing slash where realpath doesn't.

    0 讨论(0)
  • 2021-01-28 16:41

    your folder name is Upload and not uploads

    use it like this

    $config['upload_path'] = './Upload/414208/';
    
    0 讨论(0)
提交回复
热议问题