PHP速学教程(入门到精通)
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
<code id="code0"><?php <br/>//calendar.php<br>//Check if the month and year values exist<br>if ((!$_GET['month']) && (!$_GET['year'])) {<br> $month = date ("n");<br> $year = date ("Y");<br>} else {<br> $month = $_GET['month'];<br> $year = $_GET['year'];<br>}<br>//Calculate the viewed month<br>$timestamp = mktime (0, 0, 0, $month, 1, $year);<br>$monthname = date("F", $timestamp);<br>//Now let's create the table with the proper month<br>?><br><table style="width: 105px; border-collapse: collapse;" border="1" cellpadding="3" cellspacing="0" bordercolor="#000000">
<br> <tr>
<br> <td colspan="7" class="calendartodayoff">
<br> <span style="font-weight: bold;"><?php echo $monthname . " " . $year; ?></span><br> </td>
<br> </tr>
<br> <tr>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">Su</span><br> </td>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">M</span><br> </td>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">Tu</span><br> </td>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">W</span><br> </td>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">Th</span><br> </td>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">F</span><br> </td>
<br> <td class="calendartodayoff">
<br> <span style="font-weight: bold;">Sa</span><br> </td>
<br> </tr>
<br> <?php <br/> $monthstart = date("w", $timestamp);<br> $lastday = date("d", mktime (0, 0, 0, $month + 1, 0, $year));<br> $startdate = -$monthstart;<br> <br> //Figure out how many rows we need.<br> $numrows = ceil (((date("t",mktime (0, 0, 0, $month + 1, 0, $year)) + $monthstart) / 7));<br> <br> //Let's make an appropriate number of rows...<br> for ($k = 1; $k ?><tr>
<?php <br/> //Use 7 columns (for 7 days)...<br> for ($i = 0; $i $startdate++;<br> if (($startdate $lastday)){<br> //If we have a blank day in the calendar.<br> ?><td style="background: #FFFFFF;"> </td>
<?php <br/> } else {<br> <br> if ($startdate == date("j") && $month == date("n") && $year == date("Y")){<br> ?><td class="calendartodayoff" .>',event);" ><?php echo date ("j"); ?>
</td>
<?php <br/> } else {<br> ?><td class="calendaroff" .>',event);" ><?php echo $startdate; ?>
</td>
<?php <br/> }<br> }<br> }<br> ?></tr>
<?php <br/> }<br> ?> <br>
</table>
php免费学习视频:立即学习
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!
已抢7204个
抢已抢94855个
抢已抢14826个
抢已抢52068个
抢已抢194763个
抢已抢87280个
抢