2013-10-14 18:13
浏览 44


I am trying to upload image to my Codeigniter application hosted on Openshift. My app structure is as follows

   - application
   - public
       - uploads

I want to upload images to this uploads folder. my code




But above gives me The upload path does not appear to be valid. error. I have tried several ways. But the problem is the server do not allow to upload to the location.

Normally I can access the files in the uploads folder. But when I try to write data (store file) it doesn't allow. How can I fix this thing.

Note: I want the solution for the Openshift server but not the localhost

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • dongqi8863 2013-10-14 21:02

    The path is supposed to be $OPENSHIFT_DATA_DIR (which points to ~/app_root/data).

    You can also write to /tmp but those files will be treated as ephemeral.

    You do not have write permissions anywhere in the file system.

    解决 无用
    打赏 举报