根文件夹 [英] the root folder
问题描述
我在地址 http:/ /mySite.com
在root中,我有一个文件index.html
我有一些subfiolders insid root / sub1 / sub2
我想添加一个html文件(或php)index.html,它调用index.html的
根(为了保护)
现在我已经创建了2个不同的index.html,因为我使用相对路径来设置根(.../index.html和../。 ./index.html)
我喜欢在所有文件夹中都有相同的文件,但我不知道如何调用
根文件夹。
请帮忙吗?
谢谢
Hi,
I''ve a web site in the address http://mySite.com
in the root, I''ve a file index.html
I''ve some subfiolders insid root/sub1/sub2
I like to add an html file (or php) index.html that call the index.html of
the root (in order to protect)
Now I''ve created 2 different index.html because I use relative path to
design the root (../index.html and ../../index.html)
I like to have the same file in all folders,but I don''t know how to call the
root folder.
Any help please?
Thanks
推荐答案
" toufik toufik" <到***** @ sympatico.ca>在消息中写道
新闻:DE ******************** @ news20.bellglobal.com。 ..
"toufik toufik" <to*****@sympatico.ca> wrote in message
news:DE********************@news20.bellglobal.com. ..
我在一个地址 http://mySite.com
在根目录中,我有一个文件index.html
我有一些subfiolders insid root / sub1 / sub2
我想添加一个html文件(或php)index.html调用root.html的index.html(为了保护)
现在我已经创建了2不同的index.html因为我使用相对路径设计根(../index.html和../../index.html)
我喜欢拥有相同的文件在所有文件夹中,但我不知道如何拨打
根文件夹。
请帮忙吗?
Hi,
I''ve a web site in the address http://mySite.com
in the root, I''ve a file index.html
I''ve some subfiolders insid root/sub1/sub2
I like to add an html file (or php) index.html that call the index.html of
the root (in order to protect)
Now I''ve created 2 different index.html because I use relative path to
design the root (../index.html and ../../index.html)
I like to have the same file in all folders,but I don''t know how to call the root folder.
Any help please?
你想尝试包含文件或创建链接?这是相当的
不清楚。
- 维吉尔
Are you trying to include the file or create a link to it? That is quite
unclear.
- Virgil
谢谢。
我想调用该文件:
< body onload =" document.location.href =''.. / .. / index.html' ';">
" Virgil Green" < vj*@obsydian.com>在消息中写道
新闻:QS ******************* @ newssvr22.news.prodigy。 com ...
Thanks.
I like to call the file:
<body onload="document.location.href=''../../index.html'';">
"Virgil Green" <vj*@obsydian.com> wrote in message
news:QS*******************@newssvr22.news.prodigy. com...
" toufik toufik" <到***** @ sympatico.ca>在消息中写道
新闻:DE ******************** @ news20.bellglobal.com。 ..
"toufik toufik" <to*****@sympatico.ca> wrote in message
news:DE********************@news20.bellglobal.com. ..
我在一个地址 http://mySite.com
在根目录中,我有一个文件index.html
我有一些subfiolders insid root / sub1 / sub2
我想添加一个调用root.html的index.html
的html文件(或php)index.html(为了保护)
现在我已经创建了2不同的index.html因为我使用相对路径设计根(../index.html和../../index.html)
我喜欢拥有相同的文件在所有文件夹中,但我不知道如何调用
Hi,
I''ve a web site in the address http://mySite.com
in the root, I''ve a file index.html
I''ve some subfiolders insid root/sub1/sub2
I like to add an html file (or php) index.html that call the index.html of the root (in order to protect)
Now I''ve created 2 different index.html because I use relative path to
design the root (../index.html and ../../index.html)
I like to have the same file in all folders,but I don''t know how to call
根文件夹。
请帮忙吗?
root folder.
Any help please?
您是否尝试包含该文件或创建链接?这是相当不清楚的。
- 维吉尔
Are you trying to include the file or create a link to it? That is quite
unclear.
- Virgil
" toufik toufik" <到***** @ sympatico.ca>在消息中写道
新闻:DE ******************** @ news20.bellglobal.com。 ..
"toufik toufik" <to*****@sympatico.ca> wrote in message
news:DE********************@news20.bellglobal.com. ..
我在一个地址 http://mySite.com
在根目录中,我有一个文件index.html
我有一些subfiolders insid root / sub1 / sub2
我想添加一个html文件(或php)index.html调用root.html的index.html(为了保护)
现在我已经创建了2不同的index.html因为我使用相对路径设计根(../index.html和../../index.html)
我喜欢拥有相同的文件在所有文件夹中,但我不知道如何调用
根文件夹。
Hi,
I''ve a web site in the address http://mySite.com
in the root, I''ve a file index.html
I''ve some subfiolders insid root/sub1/sub2
I like to add an html file (or php) index.html that call the index.html of
the root (in order to protect)
Now I''ve created 2 different index.html because I use relative path to
design the root (../index.html and ../../index.html)
I like to have the same file in all folders,but I don''t know how to call the root folder.
如果你想要sub1 / index.php和其他subN / index.php重定向到root,使用
头函数。
<?php
header(" Location: http://mysite.com/index.html"); / *重定向浏览器* /
/ *确保重定向时,下面的代码无法执行。 * /
退出;
?>
If you want sub1/index.php and other subN/index.php to redirect to root, use
header function.
<?php
header("Location: http://mysite.com/index.html"); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
这篇关于根文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!