3-9.php3

来自「linux操作系统中 php 核心编程所有例程 都是一些很不错的案例」· PHP3 代码 · 共 34 行

PHP3
34
字号
<HTML>
<HEAD>
<TITLE>Figure 3-9</TITLE>
</HEAD>
<BODY>
<?
	/* 
	** get the current date in number of seconds 
	*/
	$currentDate = time();

	/* 
	** print some text explaining the output 
	*/
	print("Days left before Friday:\n");
	print("<OL>\n");

	while(date("l", $currentDate) != "Friday")
	{
		/* 
		** print day name 
		*/
		print("<LI>" . date("l", $currentDate) . "\n");

		/* 
		** add 24 hours to currentDate 
		*/
		$currentDate += (60 * 60 * 24);
	}

	print("</OL>\n");
?>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?