Another way of doing this worth consideration is to make a header.php file, something along these lines:
<?PHP
$date = date('Y-m-d');
if(file_exists('grafix/ap_logo_'.$date.'.gif')) {
$file = 'grafix/ap_logo_'.$date.'.gif';
}
else {
$file = 'grafix/ap_logo_standard.gif';
}
header('Content-Type: image');
readfile($file);
?>
Then you could do:
<img src="header.php" alt="header image" />
In all your static HTML pages, and the PHP page would figure out which graphic to parse and display. This would allow you to prevent passing all your pages through the PHP interpreter when you just need to figure out which image to display.
I've not tested your specific implementation, but I'm using a similar setup elsewhere to load a random image through PHP.
On a related note, you could also do this with JavaScript and not need to convert your .html pages to .php, but would then be dependent on your users having JavaScript enabled.
Edit: Another note, the following code should be functionally equivalent to my solution with your code and readfile(). You could further reduce it by removing the $date_image variable and doing the date() check inside the file_exists() check inside readfile(), but that felt messier than the initial solution.
<?PHP
$date_image = 'grafix/ap_logo'.date('Y-m-d').'.gif';
header('Content-Type: image');
readfile(file_exists($date_image) ? $date_image : 'grafix/ap_logo_standard.gif');
?>