我有這個代碼顯示特定的內容登錄用戶。然而,使用這個我不能在頁面上包含其他的PHP文件。無論如何要重寫這個,所以我可以使用包含函數。我該如何重寫這個只有PHP成員的頁面腳本?
<?php
if($_SESSION['id'])
echo '<div id="center" class="column">center here</div>
<div id="left" class="column">leftbar here</div>
<div id="right" class="column">rightbar here</div>';
else
echo '<h1>Staff please, <a href="index.php">login</a>
before accessing this page, no access to students.</h1>';
?>
目前,我不能把在那裏說:「這兒中心」,「leftbar這裏」和「rightbar這裏」這樣的:
`<?php include("center.php"); ?>`
我是新來的這一切的東西,所以不要太複雜,謝謝!
爲什麼你不能用'include'? – Kermit 2013-03-14 21:05:54
@AarolamaBluenk我似乎在使用它們時會出現語法錯誤。 – 2013-03-14 21:48:15