如何回到公共HTML路径 [英] How to get back to public html Path

查看:114
本文介绍了如何回到公共HTML路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置默认公共目录的路径时遇到问题:
我的目录结构是:-


公共html/部门/file1.php

公共html/link.php



现在我当前的工作目录是:public html/department/

我需要从公共目录中获取一个文件(link.php).因此,在设置公共html的路径时应如何使用include函数?

请给我一个脚本,而不只是提供一个设置公共html路径以从部门目录内的公共html调用文件的功能,请帮忙.

解决方案

要求('  ../link.php'); 应该做到这一点...我想;)

丹尼


I have a problem with setting path to default public directory :
My directory Structure is :-


public html/ department / file1.php

public html/link.php



Now my current working directory is : public html/ department /

and i need a file (link.php) from public directory.So how shall i use include function in setting path to public html ?

Pls if you can help me by ,giving a script and not just a function for setting path to public html to call file from public html inside department directory.

解决方案

require('../link.php');

Should do the trick... I think ;)

Danny


这篇关于如何回到公共HTML路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆