放在<html><head>之前,然后在test.php页里来调用上面的字符串
<p align="center"><? echo("$title");?></p>
也可以这样来声明:
<?
$surname1="Marco"; $lastname1="Charette";
?>
调用:
<? echo("$surname1 $lastname1");?>
十、显示你的服务器的信息:
<? phpinfo(); ?>
十一:实现页面的跳转:
创建"jump.php"页面并且设置变量来隐藏连接的地址
<?
if ($id == "1"){$link = "http://webjx.com";}
if ($id == "2"){$link = "http://google.com";}
header("Location: $link"); // 实现了跳转
exit();
?>
保存之后,在另外一个页中加入如下代码:
<a href=http://www.webjx.com/htmldata/2005-03-05/"jump.php?id=1">Visit This Link</a>
跳转并且还把访客保存在你的页面内:
<?
if ($id == "1"){$link = "http://webjx.com";}
if ($id == "2"){$link = "http://google.com";}
echo "<frameset rows=\"0,100%\" border=\"0\">\n";
echo "<frame src=\"jump.php\" name=\"head\" scrolling=\"no\" marginheight=\"0\" frameborder=\"0\" noresize>\n";
echo "<frame src=\"$link\" name=\"body\" marginheight=\"10\" marginwidth=\"10\" frameborder=\"0\" noresize>\n";
echo "</frameset>\n";
header("Location: $link");
exit();
?>
保存为jump.php然后再其他页内加入连接代码:
<a href=http://www.webjx.com/htmldata/2005-03-05/"jump.php?id=1">Visit This Link</a>
十二
| 对此文章发表了评论 |
