Re: help in php script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PRINT is nothing but...
TimeRotateImage.php
<?php
$curr_time = (localtime());
if ($curr_time[2] >= 6 and $curr_time[2] <= 17) {
   print "<img src='image1.jpg'>";
 }
else {
   print "<img src='image2.jpg'>";
 }
?>

this script (something like this) should be called from another script like,
<?PHP
print "<img src='TimeRotateImage.php'>";
?>

did you get what i am saying? please let me know if you have some solution.
thanks

Klaus Reimer wrote:

Deepak Dhake wrote:

But i am not getting any output if i follow the above procedure. Can you tell me how to do it? I have to have the script TimeRotateImage.php which calculates which image to print accoring to local time and i want to embed the file name in html tag to print it on screen.


It's not clear what your PRINT macros are doing. Maybe you forgot to send the content-type-header? Or maybe there is a script error which is not displayed when you call the page inside a image tag. Call the script directly in your browser to see what's going on. If it outputs binary data then everything is working but you forgot the content-type header.


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux