看板
[ PHP ]
討論串[請益] 根目錄的路徑?
共 5 篇文章
內容預覽:
說到這個我想想到一個滿好玩的情形提出來分享一下. 目前手上有一個網站我是用include($tmp_path."/".$template.".php"). 的方式來引入樣板檔案。. 有時template.php裡還會再引入其它的樣板檔案。. 程式碼如下. # main.php. include(/t
(還有146個字)
內容預覽:
以下不知道有沒有錯. 在linux環境下. 你打/connect.php意思就是伺服器最頂層的connect.php. 跟在windows下c:\connect.php意思是差不多的. 如果你要指定同一個目錄的東西. 你可以用./connect.php 代表目前這個目錄的connect.php. .
(還有23個字)
內容預覽:
在根目錄放置 config.php 檔案,裡面定義:. define('Document_root',dirname(__FILE__));. 之後每個檔案請寫入:. $root_path = "./";. include($root_path . 'config.php');. 之後要 inclu
(還有190個字)