代码说

code is poetry

代码说    
碎碎念:一座城市不会老,因为每天都有人奔向灿烂的青春。  换一换

以前个人站的首页

作者:coderzheng 发布于:2014-2-26 2:19 Wednesday 分类:Cs晚八点  阅读模式

我记得以前注册过一个域名:rbyoung.com,并且域名和空间激活之后写过一个首页。先上图:

再上代码:

<?php
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set("Asia/Shanghai");
$t = getdate();
$h = $t['hours'];
if ($h>=3 && $h<6) {
     $str = "凌晨了,睡不着么?";
} elseif ($h>=6 && $h<8 ) {
     $str = "早上好!一日之计在于晨,要坚持哦! ^_^";
} else if ($h>=8 && $h<11) {
     $str = "上午好,努力工作哦! ^_^";
} else if ($h>=11 && $h<13) {
     $str = "中午了,该休息了吧.";
} else if ($h>=13 && $h<17) {
     $str = "下午了,今天工作还好么? (⊙o⊙)?";
} else if ($h>=17 && $h<19) {
     $str = "傍晚了,出去散步么?";
} elseif ($h>=19 && $h<23) {
     $str = "晚上了,今天有什么收获呢, :-D";
} elseif ($h>=23 || $h<3 ) {
     $str = "夜深了,早点睡吧, =_= ";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::test::</title>
<style type="text/css">
.hh {
font-size:12px;
color:#0066FF;
font-family:Arial;
margin:0px;
padding:0px;
display:block;
padding-bottom:5px;
}

.sp1 {
font-size:12px;
font-family:Verdana;
color:#000;
display:block;
padding-bottom:5px;
}

.dv {
width:300px;
height:100px;
background-color:#eee;
padding-top:20px;
padding-left:30px;
float:right;
}

.dv2 {
width:200px;
height:20px;
line-height:20px;
font-size:12px;
font-family:arial;
padding-left:5px;
background-color:#ccc;
float:left;
}

#main {
width:535px;
height:100px;
padding-top:40px;
margin-left:auto;
margin-right:auto;
}
}
</style>
</head>

<body>
<div id="main">
     <div class="dv2"><?php echo $str ?></div>
     <div class="dv">
          <span class="hh">"寸之" 网站正在建设中...</span>
          <span class="sp1">Hello,welcome to roberson's world.</span>
          <span class="sp1">I'm roberson,daneil roberson young.</span>
          <span class="sp1">I am a programmer.</span>
     </div>
</div>
</body>
</html> 

标签: 菜刀页 cs晚八点

你可以发表评论、引用到你的网站或博客,或通过RSS 2.0订阅这个博客的所有文章。
上一篇: 员村  |  下一篇:无情的情书

评论(5)条

云破天开 2014-04-16 16:48
我刚开始做网站的时候把网页代码全都打出来。带在身上。
coderzheng 2014-04-22 12:27
@云破天开:你够狠,:-D。
flyer 2014-03-04 07:34
让我想起了刚开始了接触网页制作!
coderzheng 2014-03-04 09:41
@flyer:你行啊,居然绕过了js的障碍。
coderzheng 2014-03-05 02:37
@flyer:我再测试一次,