Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/232.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 Can';即使路径正确,也找不到文件_Php_Wamp - Fatal编程技术网

Php Can';即使路径正确,也找不到文件

Php Can';即使路径正确,也找不到文件,php,wamp,Php,Wamp,我真的不明白这里出了什么问题 我正在使用WAMP,这是我的路径 wamp www themeister include stream gameslist.php pages test.php 我在test.ph文件中,

我真的不明白这里出了什么问题

我正在使用WAMP,这是我的路径

wamp   
     www  
          themeister   
               include   
                    stream   
                         gameslist.php   
                    pages   
                         test.php
我在test.ph文件中,试图用这个打开gameslist.php

<?php include('/themeister/include/stream/gameslist.php'); ?>

它表示文件不存在。

include()
使用文件系统,因此它在文件系统的根目录中查找它不在的位置

您可以使用
'/wamp/www/themeister/include/stream/gameslist.php'
或类似的东西(更便携):

include()
使用文件系统,因此它在文件系统的根目录中查找
/themeister/…
,而该根目录不在文件系统中

您可以使用
'/wamp/www/themeister/include/stream/gameslist.php'
或类似的东西(更便携):

$_SERVER['DOCUMENT_ROOT'] . '/themeister/include/stream/gameslist.php'