Re: help in php script
| From: | Klaus Reimer | Date: | Thu, 04 Nov 2004 15:47:39 +0000 |
| Subject: | Re: help in php script | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201182@lists.php.net to get a copy of this message | ||
Deepak Dhake wrote:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
<?PHP print "<img src='TimeRotateImage.php'>"; ?> did you get what i am saying? please let me know if you have some solution. thanksNo. I must admit, It don't understand it. Let me try: You have a script "a.php" which outputs this static content: <img src="b.php"> b.php outputs the static content "<img src="c.jpeg"> This can't work. You browser tries to download an image with the name '<img src="c.jpeg">'. I think THAT's your problem and the reason why I did not understand you problem. If you use a PHP script inside an img src attribute then this PHP-Script must output an image. Complete with content-type header and the image as binary data in the body. Or another solution for a.php: <html> <body> <img src="<?php include('b.php')?>" /> </body> </html> but I don't see the sense here. You can just do all this in one script: <?php $curr_time = (localtime()); if ($curr_time[2] >= 6 and $curr_time[2] <= 17) { $img = 'a.jpg'; } else { $img = 'b.jpg'; } ?> <html> <body> <img src="<?=$img?>" /> </body> </html> If I still misunderstood your problem then maybe your description was not detailed enough. -- Bye, K <http://www.ailis.de/~k/> (FidoNet: 2:240/2188.18) [A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391] (Finger k@ailis.de to get public key)
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc