網路上各種文章,在解釋著include的位置到底怎麼寫。因為include比較特殊,所以無法直接使用a href的觀念去寫他的路徑。那iZO就直說說明我是怎麼寫的辣 !
閱讀全文 【php】include的位置 / 路徑 / 寫法
標籤: _SERVER
【PHP】取得目前所在的網址
假設我們的網址是 https://izo.tw/index.php?code=123
echo $_SERVER['HTTP_HOST']; //顯示 izo.tw echo $_SERVER['REQUEST_URI']; //顯示 /index.php?code=123 echo $_SERVER['PHP_SELF']; //顯示 /index.php echo $_SERVER['QUERY_STRING']; //顯示 code=123