Daily pic problem



Hi every body,
am trying to create a php script that get a daily picture but am
having a problem with that,

here is the code am using:

<?php

$date = date("Y-m-d");
echo "";
$ext = ".jpg";

$photo = "/DailyPic/photos/thumbs/$date". $ext ;
switch ($photo){
case "file_exisits ($photo)":
echo "<a href='/DailyPic/photos/$date". $ext ."'>";
echo "<img src='";
echo "/DailyPic/photos/thumbs/$date". $ext ;
echo "'></a>";
break;
default:
echo "<a href='/DailyPic/photos/default.jpg'>";
echo "<img src='";
echo "/DailyPic/photos/thumbs/default.jpg";
echo "'></a>";
break;
}
?>


what I get is the default image only so I need some help please.

Thanks for and support given in advance
shror
.



Relevant Pages

  • Re: Daily pic problem
    ... shror wrote: ... am trying to create a php script that get a daily picture but am ... Why use a switch statement here, ...
    (comp.lang.php)
  • Re: Daily pic problem
    ... am trying to create a php script that get a daily picture but am ... echo ""; ... Jerry Stuckle ...
    (comp.lang.php)
  • Re: Large File Not Being Sent To Client
    ... I tried changing the php script to do fopen, fread, echo, ... The messages in the log file stop at 10MB, ... Without the header the browser is free to figure on it's own how long the data should be. ...
    (comp.lang.php)
  • Re: help! what should I do when there is a segmentation fault in my php script
    ... i also tried to insert some echo or print ... but there's not any thing but segfault in the screen. ... but some php script works well.:.those not so complex. ... What webserver program do you use? ...
    (alt.php)
  • Large File Not Being Sent To Client
    ... My company produces reports for our customers in PDF format. ... I tried changing the php script to do fopen, fread, echo, ... The messages in the log file stop at 10MB, ...
    (comp.lang.php)