PHP中文件包含:/与.
在使用include时,第一,如何包含子文件?第二,如何包含上级文件?如何使用:/与.请区别:设index.php中此代码:include("fckeditor/fcke...
在使用include时,第一,如何包含子文件?第二,如何包含上级文件?
如何使用:/与.
请区别:
设
index.php中此代码:include("fckeditor/fckeditor.php")是何意?
include("/fckeditor/fckeditor.php")是何意?
include("../fckeditor/fckeditor.php")是何意?
include("./fckeditor/fckeditor.php")是何意? 展开
如何使用:/与.
请区别:
设
index.php中此代码:include("fckeditor/fckeditor.php")是何意?
include("/fckeditor/fckeditor.php")是何意?
include("../fckeditor/fckeditor.php")是何意?
include("./fckeditor/fckeditor.php")是何意? 展开
展开全部
比如一个网站目录文件夹为“www” www下有 fckeditor文件夹和images文件夹。index.php为www下的文件和fckeditor、images为同一级别。
include("fckeditor/fckeditor.php") index.php包含www下的的fckeditor/fckeditor.php。fckeditor文件夹和index.php是同一级。
include("/fckeditor/fckeditor.php") 包含网站根目录下的/fckeditor/fckeditor.php。不管index.php在网站的什么位置,都是包含网站根目录下/fckeditor/fckeditor.php这个文件。
include("../fckeditor/fckeditor.php") 假如index.php文件在images文件夹下,包含的是fckeditor/fckeditor.php。“../”向上一级的意思。
include("./fckeditor/fckeditor.php") 这个没搞明白。
include("fckeditor/fckeditor.php") index.php包含www下的的fckeditor/fckeditor.php。fckeditor文件夹和index.php是同一级。
include("/fckeditor/fckeditor.php") 包含网站根目录下的/fckeditor/fckeditor.php。不管index.php在网站的什么位置,都是包含网站根目录下/fckeditor/fckeditor.php这个文件。
include("../fckeditor/fckeditor.php") 假如index.php文件在images文件夹下,包含的是fckeditor/fckeditor.php。“../”向上一级的意思。
include("./fckeditor/fckeditor.php") 这个没搞明白。
展开全部
你的第1,2,4中的写法其实是一样的,标识fckeditor文件夹和index.php处于同一目录下,而第3中写法说明包含index.php的文件夹和fckeditor处于同一目录下。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
include("fckeditor/fckeditor.php")表示引入在fckeditor文件夹下的fckeditor.php文件:
include("../fckeditor/fckeditor.php")表示引入在上一级文件下的fckeditor文件夹里的fckeditor.php文件:
include("./fckeditor/fckeditor.php")的意思和include("fckeditor/fckeditor.php")是一样的!!!
include("../fckeditor/fckeditor.php")表示引入在上一级文件下的fckeditor文件夹里的fckeditor.php文件:
include("./fckeditor/fckeditor.php")的意思和include("fckeditor/fckeditor.php")是一样的!!!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
就是把文件包含进来
include("fckeditor/fckeditor.php")
include("./fckeditor/fckeditor.php")
表示包含当前目录下的 fckeditor/fckeditor.php 文件
include("../fckeditor/fckeditor.php")
表示 包含上一级目录下的 fckeditor/fckeditor.php 文件
include("/fckeditor/fckeditor.php")
表示包含根目录下的 fckeditor/fckeditor.php 的文件
差别就是 相对路径 绝对路径
include("fckeditor/fckeditor.php")
include("./fckeditor/fckeditor.php")
表示包含当前目录下的 fckeditor/fckeditor.php 文件
include("../fckeditor/fckeditor.php")
表示 包含上一级目录下的 fckeditor/fckeditor.php 文件
include("/fckeditor/fckeditor.php")
表示包含根目录下的 fckeditor/fckeditor.php 的文件
差别就是 相对路径 绝对路径
参考资料: http://blog.wumashi.com
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询