PHP与HTML表格的问题 [英] php with html tables question
本文介绍了PHP与HTML表格的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我是php的新手,但是我非常了解html和css,我有一个代码可以创建php include函数,以使用html表而不是框架.我想问我应该在navbar.html中输入什么样的代码来更改主页? (例如,在帧中有target = main等.)
Hello,
I am a newbie in php but I know well html and css, I have a code that creates php include function to work with html tables instead of frames. I want to ask what kind of code shall I put in navbar.html to change the main page? (eg. in frames there is target=main etc.)
/* Roddefig's index.php script (generic demo) */
$location=$_GET['location'];
if (empty($location)) {
$location='index';
}
changelocation($location);
function changelocation($location) {
include ('header.html');
echo '<table cols="2" border="0" cellpadding="10" cellspacing="0" align="center" width="100%">';
echo '<tr>';
echo '<td width="224" bgcolor="#0099FF" valign="top">';
include('navbar.html');
echo '</td>';
echo '<td bgcolor="#33CCFF">';
switch ($location) {
case 'index':
include ('actualindex.html');
break;
case 'tutorials':
include ('http://www.genericsite.com/tutorials/index.html');
break;
}
echo '</td></tr></table>';
include ('footer.html');
}
谢谢
Kyriakos
Thank you
Kyriakos
推荐答案
location =
location=
_GET [' 位置']; 如果(空(
_GET['location']; if (empty(
位置)){
这篇关于PHP与HTML表格的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文