duanfu3884 2013-07-24 15:41
浏览 63
已采纳

使用/ CodeIgniter在Apache服务器上保存为“/”

This seems like a basic question, but it's stumping me. I have CodeIgniter installed, and I've got a model that manipulates and saves XMLs. My problem is when trying to save it to "/" I get a "Permission denied" PHP error. I need to save them to a separate directory relatively, but I'm not sure where exactly "/" is located on the server. Is it in the "/www" of Apache, or root of the whole server? Once I know this I should be able to navigate to the correct directory

  • 写回答

2条回答 默认 最新

  • dongshadu4498 2013-07-24 15:45
    关注

    / is the root directory. The starting point of your directory structure. This is where the Linux system begins. Every other file and directory on your system is under the root directory. Usually the root directory contains only sub-directories, so it's a bad idea to store single files directly under root.

    Try specifying the complete path in your application.

    Example: /home/user/public_html/yourApplicationFolder/

    Or specify a relative path:

    Example: ../somePath/.

    This article could be helpful.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 matlab计算中误差
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊