先贴代码:
  
<?php
error_reporting(7);
echo "000";include_once('../inc/common.inc.php');
echo "sss";
include_once("header.php");
print<<<EOF
<link href="style.css" rel="stylesheet" type="text/css" />
EOF;
?>调用路径没有问题,可是第一个require就是不起作用,郁闷。只输出了‘000’,也没有任何的报错和警告!
本地测试时没有问题的,可一旦传到服务器(Linux系统)上就出现了上述问题。
求高手解答!

解决方案 »

  1.   

    看看是否还有其他文件调用?
    修改成include()试试
      

  2.   

    我把程序传到windows服务器下测试了,可以的完全没问题。
      

  3.   

    文件夹/文件访问权限?■□■□■□■□■□■□■□■
    □             □
    ■  忍以明志 勤以致远  ■
    □             □
    ■□■□■□■□■□■□■□■
    基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)
      

  4.   

    文件名大小写的问题?还有,用 phpinfo() 查一下你的 include_path 配置,因为你用的“相对路径”。
    --------
    With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is
    hard to be sure where they are going to land, and it could be dangerous sitting under them as they
    fly overhead.
      

  5.   

    哎,不对呀?include_once() 就算找不到文件,也不会终止运行啊……还是看看 ../inc/common.inc.php 这个文件的内容吧,是不是有什么在你的 Linux 服务器环境下不能运行的东西。--------
    With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is
    hard to be sure where they are going to land, and it could be dangerous sitting under them as they
    fly overhead.
      

  6.   


    include_path  .:/usr/share/pear
    ../inc/common.inc.php 的内容。包含的三个文件和它是同级的error_reporting(7);   //默认为0,改为7可提示错误。
    //date_default_timezone_set('Asia/Shanghai');
    set_magic_quotes_runtime(0);if(PHP_VERSION < '4.1.0') {
    $_GET = &$HTTP_GET_VARS;
    $_POST = &$HTTP_POST_VARS;
    $_COOKIE = &$HTTP_COOKIE_VARS;
    $_SERVER = &$HTTP_SERVER_VARS;
    $_ENV = &$HTTP_ENV_VARS;
    $_FILES = &$HTTP_POST_FILES;
    }
    //引入必要的配置文件及函数库
    require_once('config.inc.php');
    require_once('global.function.php');
    require_once('App_function.php');
      

  7.   

    这样看来,/usr/share/inc/common.inc.php 这个文件本身似乎没什么问题,不过那个
    require_once('App_function.php');
    有点可疑,文件名大小写没有问题吗?你可以试着先把 /usr/share/inc/common.inc.php 的内容都注释掉,看看主程序是不是正常了。■□■□■□■□■□■□■□■
    □             □
    ■  忍以明志 勤以致远  ■
    □             □
    ■□■□■□■□■□■□■□■
    基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)
      

  8.   

    echo realpath('../inc/common.inc.php');得到的是什么?
      

  9.   

    //引入必要的配置文件及函数库
    require_once('config.inc.php');
    require_once('global.function.php');
    require_once('App_function.php');肯定是你这块有问题..如果require出错的话,你这个文件就会终止运行.所以你在另一个文件中调用是没用的.
      

  10.   

    首先在本地不起作用,请用var_dump(is_file('../inc/common.inc.php'))看看文件是否存在
    如果文件存在,那么楼主看看本地目录结构和服务器的目录结构是否相同