我希望能够交换文件而不是图像。我自己改变了一些代码,但不是很成功。我需要更改什么才能使其正常工作?提前谢谢。
<?php
$url = "http://site.com/days";
$monImage = "$url"."monday.jpg";
$tueImage = "$url"."tuesday.jpg";
$wedImage = "$url"."wednesday.jpg";
$thurImage = "$url"."thursday.jpg";
$friImage = "$url"."friday.jpg";
$weekendImage = "$url"."weekend.jpg";
$d = date("D");
switch ($d)
{
case Mon:
echo "<img src=$monImage>\n";
break;
case Tue:
echo "<img src=$tueImage>\n";
break;
case Wed:
echo "<img src=$wedImage>\n";
break;
case Thu:
echo "<img src=$thurImage>\n";
break;
case Fri:
echo "<img src=$friImage>\n";
break;
default:
echo "<img src=$weekendImage>\n";
}
?>
答案 0 :(得分:0)
echo '<img src="http://site.com/days' . strtolower( date('l') ) . '.jpg" />';