我正在爲學校創建一個網站,我在使用php包含文件時遇到問題。PHP的包括和路徑
所以我以下結構:
- 的index.php
- 包括/
- head.php
- 風格/
- 的style.css
- 網站/
- contact.php
現在我已經聯繫我的CSS文件中的header.php
而header.php文件包含在的index.php並在contact.php,
所述的header.php的代碼是:
<link href="style/style.css" rel="stylesheet" type="text/css">
的index.php文件的代碼是:
include 'include/head.php';
而且contact.php的代碼是:
include '../include/head.php';
但是服務器找不到css文件,當我打開contact.php
有人能幫助我嗎?