Jump to content


Photo

How to get this small code to to include a gif instead?


  • Please log in to reply
1 reply to this topic

#1 11Tami

11Tami
  • Members
  • PipPipPip
  • Advanced Member
  • 329 posts

Posted 26 October 2006 - 01:40 PM

ss

#2 Psycho

Psycho
  • Moderators
  • Move along, nothing to see here
  • 11,892 posts
  • LocationCanada

Posted 26 October 2006 - 02:38 PM

You need to be a little more specific by what you mean to "include a gif". the include function merely reads the file specified as code. So, you are reading the contents of the gif as code, thus the numbers.

I am going to assume you are wanting this code to display a gif. In that case you cuold do something like this:

<?php

$getfile = date("j");
$imagefile = "file" . $getfile . ".gif";
echo "<img src=\"$imagefile\">";

?>

The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users