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