<?php
echo "You Came From:<br />";
echo $_SERVER['HTTP_REFERER'];
?>
六:设置IP地址的转向:屏蔽IP
<?php
if(($REMOTE_ADDR == "22.22.22.22")):// ip address
print "<meta http-equiv='refresh' content='0; url=http://www.sina.com'>";// url to redicted
endif;
?>
七:随即显示标题的代码:
<Title><?php include("title.php");?></Title>
要事先做一个title.php文件啊
八;如何用PHP来建立一个HTML 的table
<?php
echo"<html>\n";
echo"<head>\n";
echo"<title>allo</TITLE>\n";
echo"</head>\n";
echo"<body topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"5\"
bgcolor=\"#ffffff\">\n";
echo"<center>\n";
echo"<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n";
echo"<tr>\n";
echo"<td>\n";
echo"<p align=\"center\">\n";
echo"
\n";
echo"Text Goes Here\n";
echo"</p>\n";
echo"</td>\n";
echo"</tr>\n";
echo"</table>\n";
echo"</center>";
echo"</body>\n";
echo"</html>";
?>
九、声明字符串变量:
建立一个页面 ( config.php ) 粘贴下面代码:
<?
$name="Name";
$salutation="Hey!";
$title="webjx.com";
$copyrights="©2005 webjx.com";
$link_1="Home";
?>
创建一个页面( test.php )把下列代码
<? include("conf
| 对此文章发表了评论 |
