【发布时间】:2010-10-21 15:42:52
【问题描述】:
在 PHP 版本更新之前,我曾经能够在不指定文档根目录的情况下包含以下文件:
<?php include '/absolute/path/to/files/file1.php'; ?>
但是我现在必须包含以下相同的文件:
<?php include $_SERVER['DOCUMENT_ROOT'].'/absolute/path/to/files/file1.php'; ?>
什么 php.ini 设置可以覆盖以前的行为?
【问题讨论】:
-
Linux:RHEL 5 PHP:版本 PHP 5.2.9 我得到的错误消息是:PHP 警告:需要(/conf/common.php):无法打开流:/ 中没有这样的文件或目录var/www/vhosts/DOMAIN/httpdocs/tell-a-friend-fns.php 在第 63 行 PHP 致命错误:require(): Failed opening required '/conf/common.php' (include_path='.:/usr/ share/pear:/usr/lib/php:/tmp') 在第 63 行的 /var/www/vhosts/DOMAIN/httpdocs/tell-a-friend-fns.php 中