Re: help in php script

From: Date: Thu, 04 Nov 2004 15:33:08 +0000
Subject: Re: help in php script
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-201181@lists.php.net to get a copy of this message
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.


« previous php.general (#201181) next »