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 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化