Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php $\u服务器查询未返回正确的值_Php - Fatal编程技术网

Php $\u服务器查询未返回正确的值

Php $\u服务器查询未返回正确的值,php,Php,当我尝试为我的网站设置导航时,我不断收到以下错误: 找不到 在此服务器上找不到请求的URL/服务 此外,在尝试查找时遇到404 Not Found错误 使用ErrorDocument来处理请求 我想要的是内容div是动态的。因此,当用户单击“关于我们”时,该div将显示“关于我们”等。页面的其余部分现在将是静态的。然而,每当我点击任何导航时,都会出现上面的错误。当我检查URL时,它只显示:http://www.fts.us/about_us 以下是我迄今为止所做的: <?php #main

当我尝试为我的网站设置导航时,我不断收到以下错误:

找不到

在此服务器上找不到请求的URL/服务

此外,在尝试查找时遇到404 Not Found错误 使用ErrorDocument来处理请求

我想要的是内容div是动态的。因此,当用户单击“关于我们”时,该div将显示“关于我们”等。页面的其余部分现在将是静态的。然而,每当我点击任何导航时,都会出现上面的错误。当我检查URL时,它只显示:
http://www.fts.us/about_us

以下是我迄今为止所做的:

<?php #main index 
 set_include_path('var/chroot/home/content/22/10350022/html'); // path to root on ftp

 include($_SERVER['DOCUMENT_ROOT']."/config/setup.php"); //include setup file 
?>


<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; 
charset=utf-8">
<title>Untitled Document</title>
</head>
<link rel="stylesheet" type="text/css" href="/css/styles.css">


<body>
    <div class ="header tempBloc">
          <?php include($_SERVER['DOCUMENT_ROOT']."/templates/header.php");?>

     </div>

    <div class ="navs   tempBloc">
          <?php include($_SERVER['DOCUMENT_ROOT']."/templates/navs.php");?>

        </div>
    <div class ="main_content   tempBloc">
         <?php
               $page = basename($_SERVER['QUERY_STRING']);
                   if(!$page){
                     include('/content/home.php');
                   } else {
                   if(file_exists('/content/'.$page.'.php')){
                     include('/content/'.$page.'.php');
                   } else {
                     echo('This page does not exist!');
                   } 
                 }  

            #var_dump($_SERVER)
            ?> 

      </div>
      <div class ="footer   tempBloc">
          <?php include($_SERVER['DOCUMENT_ROOT']."/templates/footer.php");?>   
      </div>

    </body>
    </html>
URL/URI似乎不正确,它应该显示:
http://www.fts.us/index.php?page=about_us.php
。但事实并非如此

哦,这是我的导航……如果有用的话

include($\u SERVER['DOCUMENT\u ROOT'].“/config/setup.php”);
?>

谢谢,如有任何帮助,我们将不胜感激

这有太多的错误了,我甚至不能在不写小说的情况下开始逐条列出它们。我修好了导航。但是如果你有任何关于如何清理以使其更安全的建议。我将不胜感激=你确定
set_include_路径('var/chroot/home/content/22/10350022/html')结尾不需要
/
array(42) { ["TMPDIR"]=> string(29) "/home/content/22/10350022/tmp" ["PHPRC"]=> string(41) "/var/chroot/home/content/22/10350022/html" ["TEMP"]=> string(29) "/home/content/22/10350022/tmp" ["PHP_FCGI_CHILDREN"]=> string(1) "0" ["PATH"]=> string(29) "/sbin:/usr/sbin:/bin:/usr/bin" ["PWD"]=> string(12) "/web/cgi-bin" ["SHLVL"]=> string(1) "0" ["RAILS_ENV"]=> string(10) "production" ["SPI"]=> string(4) "TRUE" ["TMP"]=> string(29) "/home/content/22/10350022/tmp" ["PHP_FCGI_MAX_REQUESTS"]=> string(6) "100000" ["FCGI_ROLE"]=> string(9) "RESPONDER" ["UNIQUE_ID"]=> string(24) "US6vlq3JxKUAAAhxGA8AAADI" ["SCRIPT_URL"]=> string(10) "/index.php" ["SCRIPT_URI"]=> string(47) "http://www.fts.us/index.php" ["HTTP_HOST"]=> string(30) "www.fts.us" ["HTTP_CONNECTION"]=> string(5) "close" ["HTTP_ACCEPT"]=> string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" ["HTTP_USER_AGENT"]=> string(108) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22" ["HTTP_ACCEPT_ENCODING"]=> string(17) "gzip,deflate,sdch" ["HTTP_ACCEPT_LANGUAGE"]=> string(14) "en-US,en;q=0.8" ["HTTP_ACCEPT_CHARSET"]=> string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.3" ["SERVER_SIGNATURE"]=> string(75) "
Apache Server at www.fts.us Port 80
" ["SERVER_SOFTWARE"]=> string(6) "Apache" ["SERVER_NAME"]=> string(30) "www.fts.us" ["SERVER_ADDR"]=> string(12) "72.167.0.128" ["SERVER_PORT"]=> string(2) "80" ["REMOTE_ADDR"]=> string(14) "76.116.108.244" ["DOCUMENT_ROOT"]=> string(41) "/var/chroot/home/content/22/10350022/html" ["SERVER_ADMIN"]=> string(26) "support@supportwebsite.com" ["SCRIPT_FILENAME"]=> string(51) "/var/chroot/home/content/22/10350022/html/index.php" ["REMOTE_PORT"]=> string(5) "51614" ["GATEWAY_INTERFACE"]=> string(7) "CGI/1.1" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["REQUEST_METHOD"]=> string(3) "GET" ["QUERY_STRING"]=> string(0) "" ["REQUEST_URI"]=> string(10) "/index.php" ["SCRIPT_NAME"]=> string(10) "/index.php" ["PHP_SELF"]=> string(10) "/index.php" ["REQUEST_TIME"]=> int(1362014102) ["argv"]=> array(0) { } ["argc"]=> int(0) }
include($_SERVER['DOCUMENT_ROOT']."/config/setup.php");
?>
 <a href="home">home</a>
 <a href="services">services</a>
 <a href="about_us">about_us</a>
 <a href="3_things">3_things</a>
 <a href="free_stuff">free_stuff</a>