簡體   English   中英

即使路徑正確也找不到文件

[英]Can't find file even though path should be correct

我真的不明白這里出了什么問題。

我正在使用WAMP,這是我的路線

wamp   
     www  
          themeister   
               include   
                    stream   
                         gameslist.php   
                    pages   
                         test.php

我在文件test.ph中,並嘗試與此一起打開gameslist.php

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

它說該文件不存在。

include()使用文件系統,因此它正在文件系統的根目錄include()中尋找/themeister/...

您可以使用'/wamp/www/themeister/include/stream/gameslist.php'或類似的文件(更便於攜帶):

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM