a文件夹里有文件夹b和c,我现在想在b文件夹里的m文件里包含c文件夹里的n文件,应该怎么写?
include(a/c/n.php),这样写对吗?

解决方案 »

  1.   

    m文件是运行文件?
    是的话
    在m文件中<?php
    include("./c/n.php");?>
      

  2.   


      include_once dirname(dirname(__FILE__)).'/c/n.php';
      

  3.   

    按照daly2008说的不对啊
    Warning: include(./fckeditor/fckeditor.php) [function.include]: failed to open stream: No such file or directory in D:\wamp\www\shaoer\houtai\add_news.php on line 93
      

  4.   

    include_once '../c/n.php';是对的,其实我的问题是我在下载的fckeditor文件夹里引用fckeditor没问题,我就这样就可以了
     include('fckeditor.php'); $sBasePath = $_SERVER['PHP_SELF'] ; $sBasePath = dirname($sBasePath).'/'; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->Create();
    问题是,我想在fckeditor文件夹外引用fckeditor的话,光修改include还不行是吧,请教我正确方法
      

  5.   

    只要修改include就行,只要保证路径正确,确定你需要的文件被加载进去就可以了。