我要在a.php中的任意位置上调用b.php

解决方案 »

  1.   

    to: troopers(骑兵) 
    用这种形式<?include("b.php");?>   php.ini是不是要修改一下。
    还有请问一下这种<?include("b.php");?>与这种<? @include("b.php"); ?>
    有什么区别?提示错误:
    Warning: main(b.php): failed to open stream: No such file or directory in D:\www\index.php on line 569Warning: main(): Failed opening 'b.php' for inclusion (include_path='.;c:\php4\pear') in D:\www\index.php on line 569
      

  2.   

    to: troopers(骑兵) 
    按照这样写了还是出错,是不是在php.ini里要修改一下的。
    出错信息:
    Warning: main(b.php): failed to open stream: No such file or directory in D:\www\index.php on line 569Warning: main(): Failed opening 'b.php' for inclusion (include_path='.;c:\php4\pear') in D:\www\index.php on line 569还要请问一下这种<?include("b.php");?>与<? @include("b.php"); ?>这种有什么区别?
    我在用<? @include("b.php"); ?>不会出现上面的错误,但是什么内容也没有。
      

  3.   

    提示很明确,是找不到文件。检查相对路径
    重点在于是否是c.php中include进了a.php?如果此时路径不同,会有问题
      

  4.   

    No such file or directory in D:\www\index.php on line 569
    目录中无该文件。你的两个文件应该放在同一个目录下。
      

  5.   

    路径问题,调用b.php的这个文件应该和b.php不在同一级目录!
      

  6.   

    如果是linux也有可能是你文件名或扩展名大小写问题.