今天我用include ('blocks/block.php');时,不能包括block.php页面,
当调用页index.php与被调用页在同一目录时,就可以调用,不知道这是什么原因?然后我用ZS检查,出现这样的警告信息
Debug Warning: PHPDocument1 line 11 - include(blocks/block.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directoryDebug Warning: PHPDocument1 line 11 - include() [<a href='function.include'>function.include</a>]: Failed opening 'blocks/block.php' for inclusion (include_path='d:\Program Files\Zend\ZendStudio-5.5.0\bin\ZendFramework\library')

解决方案 »

  1.   

    可能是目录问题,如果blocks和index.php是同一目录,能调用
    否则会有问题
    你仔细看错误提示,看提示路径,如路径不对,是你引用错误
      

  2.   

    可能是目录问题如果include ('blocks/block.php');这样引用,那么index.php文件跟blocks文件夹必须是同级
      

  3.   

    include ('./blocks/block.php');这样呢?你是用的IIS么?
      

  4.   

    include ('./blocks/block.php');因为你的
    include_path='d:\Program Files\Zend\ZendStudio-5.5.0\bin\ZendFramework\library'