2011-04-01 100 views
-1

我想用php爲我的網站創建一個動態標題頁面,但我無法做到。請告訴我更好的建議我如何學習它,並給我的教程鏈接。我如何在PHP中創建一個動態頁面標題

我解釋說,

這裏是我的index.php文件和其他文件是header_final.php。在header_final.php的底部有一些像家一樣的按鈕,如何應用,座位方案。我想這樣做,當一個按鈕點擊,然後不同的頁面標題即將到來。這是我的問題。請幫我...

的index.php

<?php 
    include("include/header_final.php"); 

?> 





<div id="page"> 
    <div id="page-bgtop"> 
     <div id="page-bgbtm"> 
      <div id="content"> 
       <div class="post"> 
        <h2 class="title"><a href="#">Home</a></h2><br> 

        <div class="entry"> 
         <p><img src="images/img08.jpg" width="538" height="200" alt="" /></p> 


        </div> 
       </div> 



       <div class="post"> 


       </div> 
       <div style="clear: both;">&nbsp;</div> 
      </div> 
      <!-- end #content --> 











<?php 

include ("include/footer_final.php"); 

?> 

header_final.php

<html> 
<head> 
<meta name="keywords" content="" /> 
<meta name="description" content="" /> 

<title> </title> 



</head> 
<body> 





<div id="wrapper"> 
<div id="header"> 
    <div id="logo"> 

    </div> 
    <div id="menu"> 
     <ul> 
    <li class="first current_page_item"><a href="index.php">Home</a></li> 
      <li><a href="apply.php">How to Apply</a></li> 


     </ul> 
    </div> 
</div> 
+1

「動態」 是一個模糊的,馬虎了事流行語因此,目前還不清楚是什麼你想做。我們不知道你的PHP是如何構建的,所以我們不知道如何處理它的大部分內容。你還沒有提供任何顯示你的嘗試的代碼。你有什麼嘗試?預期的結果是什麼?實際結果是什麼? – Quentin 2011-04-01 12:06:33

回答

3
<head> 
    <title> <?php echo "My dynamic title gotten from somewhere";?> </title> 
</head>