如何在php中指定路径 [英] How to specify path in php

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

问题描述

我正在尝试打开一个位于C:\ xampp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\写这段代码

<?php

$ path = $ _ SERVER ['DOCUMENT_ROOT']。C:\ xampp \\\\\\\\\\\\\\

?>



错误:不要直接访问超全局$ SERVER数组

使用一些过滤功能代替。(例如filter_input())





请帮帮我。我正在学习php。

i am trying to open a php project which is in C:\xampp\htdocs\unigoa.indowordnet

thr z some problem when i am writing this code
<?php
$path=$_SERVER['DOCUMENT_ROOT']."C:\xampp\htdocs\unigoa.indowordnet";
?>

Error: Do not access superglobal $SERVER array directlty
use some filtering function instead.( eg filter_input())


please help me. i m learning php.

推荐答案

path =


_SERVER ['DOCUMENT_ROOT']。C:\ xampp \ htdocs \ .unigoa.indowordnet;

?>



错误:不访问superglobal
_SERVER['DOCUMENT_ROOT']."C:\xampp\htdocs\unigoa.indowordnet";
?>

Error: Do not access superglobal


SERVER数组直接

使用一些过滤功能。(例如filter_input())





请帮忙我。我正在学习php。
SERVER array directlty
use some filtering function instead.( eg filter_input())


please help me. i m learning php.


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

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