Re: Daily pic problem
- From: PHPGB <me@xxxxxxxxxxx>
- Date: Sat, 20 Sep 2008 15:14:30 +0100
<comp.lang.php>
<shror>
<Sat, 20 Sep 2008 06:04:48 -0700 (PDT)>
<cf906137-a3d6-49ff-83fd-1e03a76ee698@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
I have tried the if
(file_exists ($photo)) and its also giving me the default image
Untested - but it should work .
<?php
$date=date("Y-m-d");
$rambo1="DailyPic/photos/thumbs/$date" . ".jpg";
$rambo2="DailyPic/photos/photos/$date" . ".jpg";
$batman1=$rambo1;
$batman2=$rambo2;
if (!file_exists($batman1))
{
$rambo1="DailyPic/photos/thumbs/default.jpg";
$rambo2="DailyPic/photos/photos/default.jpg";
}
if (!file_exists($batman2))
{
$rambo1="DailyPic/photos/thumbs/default.jpg";
$rambo2="DailyPic/photos/photos/default.jpg";
}
$xy=getimagesize($rambo1);
print "<div align=center>";
print "<a href=$rambo2>";
print "<img src=$rambo1 width=$xy[0] height=$xy[1] border=0>";
print "</a>";
print "</div>";
?>
--
www.phpguestbook.co.uk/phpgb
(the best php guestbook on planet earth)
.
- Follow-Ups:
- Re: Daily pic problem
- From: Paul Herber
- Re: Daily pic problem
- References:
- Daily pic problem
- From: shror
- Re: Daily pic problem
- From: Jerry Stuckle
- Re: Daily pic problem
- From: shror
- Daily pic problem
- Prev by Date: Re: Daily pic problem
- Next by Date: Re: PHP work hours
- Previous by thread: Re: Daily pic problem
- Next by thread: Re: Daily pic problem
- Index(es):
Relevant Pages
|