dongxie45083 2013-10-28 22:06
浏览 201

如何在LAMP中引用Web根目录上一级目录

I'm trying to find the most effective(safest) way to utilise my own class Library which i want to put outside of public_html site root on a linux (shared hosting) server. Several classes inside public_html in my site need to reference the classes outside the root and vise-versa. (see attached image)

enter image description here

Typically in one of my site classes in a directory on the root i have this line in a class: 
require_once("/home/my_isp_username/myCommonClasses/utilitybelt.php"); 

which should reference a class file (utilitybelt.php) one-level above the root. Im getting a blank page and no errors returning; not even warnings, just a blank page. Note (shared hosting so no access to Apache/PHP config files)

Anyone know the correct way to do this?

  • 写回答

1条回答 默认 最新

  • dqy0707 2013-10-28 22:08
    关注

    Probably your web server does not have permissions to access files in that directory. On shared hosting I doubt that anyone will let you access it, so may be try moving the directory inside your web root.

    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100