88问答网
所有问题
php中include('上级目录文件');
php中include('上级目录文件');其中的上级目录格式怎么写?或者是否可以这样写,或者有其他写法
举报该问题
推荐答案 推荐于2018-02-27
当前文件所在目录引用方法为:
<?php
include('test.php');
?>
或者:
<?php
include('./test.php');
?>
上级目录引用方法:
<?php
include('../test.php');
?>
上上级引用方法:
<?php
include('../../test.php');
?>
总结:
其中 . 表示当前目录 ..表示上级目录 /表示目录
分隔符
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://88.wendadaohang.com/zd/Mc11ggSK1SgVVVMKg1a.html
其他回答
第1个回答 2015-08-19
当前文件所在目录引用方法为:
<?php
include('test.php');
?>
或者:
<?php
include('./test.php');
?>
上级目录引用方法:
<?php
include('/../test.php');
?>
上上级引用方法:
<?php
include('/../../test.php');
?>
第2个回答 2014-05-15
上级目录是两个点号加一个斜杠
../
相似回答
如何
include
上一级目录
下
的PHP文件
答:
// 引用当前
目录
下的
文件include
'main.inc.php';include './main.inc.php';// 引用
上级目录
下的文件include '../main.inc.php';// 引用上上级目录下的文件include '../../main.inc.php';
php中
用
include
可不可以调用
上级的目录
比如用a/b/index.php调用a/in...
答:
../index.
php
../就是指上一级
目录
你当前a/b/index.php是在a/b这个目录, 它的
上级
../就是a目录了
PHP的include
引用
上级文件
问题。
答:
这不是引入的问题,你定义的类,类外的值是不会进来的,想要实现你这个功能Medoo.Min.
php
要这样:<?php
include
'../config.php';class medoo{ function __construct( $server, $username, $password ){ this->server = $server;this->username = $username;this->password = $password;} //...
php里的 include(
“xx.htmp”) 路径的问题,我把xx.html
文件
放在同一...
答:
include
(../xx.html),../表示
上级目录
,./表示当前同一级目录
PHP中文件
包含:/与.
答:
1、
include(
"fckeditor/fckeditor.php");意思是:调用index.php所处
目录
下的fckeditor目录下面的fckeditor.
php文件
。2、include("/fckeditor/fckeditor.php");意思是:调用index.php所在目录根目录下面的fckeditor目录下面的fckeditor.php文件。3、include("../fckeditor/fckeditor.php");意思是:调用index....
bootstrap遇到了
php的include
怎么写
答:
./表示
上级目录
,./表示当前同一级目录
php
include
路径问题
答:
首先要确认你访问
的文件
,假如你访问的是 A1/index.php 内容加上
include
"../b1/index.php";使用相对路径,意思是包含当前目录(A1
)的上级目录
下的目录B1下的index.
php文件
。
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") 包含...
大家正在搜
dockerphpinclude
php中的include
Php中include用法
includelinux安装
include包含文件
autoit 获得上级目录
上级目录
上级目录怎么表示
上级目录是什么意思
相关问题
如何include 上一级目录下的PHP文件
php不能调用上级目录文件解决
PHP的include引用上级文件问题。
请问,php中include如何调用其他目录下的文件?
PHP中include怎么实现相对路径跨文件夹同步调用啊
PHP如何修改上级目录中的文件?
php 文件层次 如果要用到上层目录的文件要用‘../’??
php获取上级文件绝对路径