if(!file_exists(index.php)) => Wenn File nicht da ist, dann mach den Else-Zweig.
Ist doch richtig oder?
Ist doch richtig oder?
if(!file_exists("/img/pic_sg.gif"))
{
echo"<img src=\"/img/pic_sg_.gif\" border=\"0\">";
}
else
{
echo "";
}
OffTopic:
@wotan: ich zweifle
OffTopic:
Nein du brauchst nicht zweifeln! Es reicht ja schon wenn ich an mir selber zweifel.
<?
$y = date("Y");
$m = date("m")-1;
if($m <= 9)
{
$m = "0".$m;
}
if($m == 0)
{
$m = 12;
$y = $y-1;
}
if(!file_exists("/img/pic_sg_".$y."-".$m.".gif"))
{
echo"<img src=\"/img/pic_sg_".$y."-".$m.".gif\" border=\"0\">";
}
else
{
echo "";
}
?>
<?
$y = date("Y");
$m = date("m")-1;
if($m <= 9)
{
$m = "0".$m;
}
if($m == 0)
{
$m = 12;
$y = $y-1;
}
$file_pic = "pic_sg_".$y."-".$m.".gif";
if(file_exists($file_pic))
{
echo"<img src=\"/img/whl/$file_pic\" border=\"0\">";
}
else
{
echo "/img/whl/$file_pic ist nicht da!";
}
?>
$y = date("Y");
$m = date("m")-1;
if($m <= 9)
{
$m = "0".$m;
}
if($m == 0)
{
$m = 12;
$y = $y-1;
}
if(file_exists("img/whl/pic_sg_".$y."-".$m.".gif"))
{
echo"<img src=\"img/whl/pic_sg_".$y."-".$m.".gif\" border=\"0\">";
}
else
{
echo "";
}
<?
$y = date("Y");
$m = date("m")-1;
if($m <= 9)
{
$m = "0".$m;
}
if($m == 0)
{
$m = 12;
$y = $y-1;
}
$file_pic1 = "img/pic_sg_".$y."-".$m.".gif";
$file_pic2 = "img/pic_g_".$y."-".$m.".gif";
if(file_exists($file_pic1))
{
echo"<img src=\"/$file_pic1\" border=\"0\">";
}
else
{
if(file_exists($file_pic2))
{
echo"<img src=\"/$file_pic2\" border=\"0\">";
}
else
{
echo" ";
}
}
?>
echo"<img src=\"img/pic_sg_".$y."-".$m.".gif\" border=\"0\">";
Kommentar