donglan7594 2011-06-05 12:05
浏览 47
已采纳

从CPanel移动到Plesk后无法包含文件

I have a base set of files that are included from lots of other files. This saves me having to update lots of files when I made changes. The issues is, in CPanel my directory structure was:

Base: domain/public_html/base_data Subdomain: domain/public_html/subdomain

This meant I could just go back one directory and include the file. Now that I have moved to Plesk it is like this:

Base: domain/httpdocs/base_data Subdomain: domain/subdomains/subdomain/httpdocs/

The problem with this is none of my includes work when I ../../ out of my current sub domain into the base_data one.

Anyone have any ideas how to fix this?

EDIT: Just turned error reporting on and got this open_basedir restriction in effect. File(/var/www/vhosts/domain.com/httpdocs/base_data/index.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/subdomains/rip/httpdocs:/tmp) in /var/www/vhosts/domain.com/subdomains/rip/httpdocs/index.php on line 14

  • 写回答

2条回答 默认 最新

  • duanaiguang1960 2011-06-05 12:07
    关注

    Yes use ABSOLUTE path.

    you can make a $yourLibPath = 'domain/httpdocs/base_data/';

    And then include all your libs using this var:

    include($yourLibPath.'time.lib.php');
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题