[PHP] help in php script

2004-11-04 Thread Deepak Dhake
I have a following PHP file TimeRotateImage.php which prints an image ?php $curr_time = (localtime()); if ($curr_time[2] = 6 and $curr_time[2] = 17) { PRINT IMAGE_1; } else { PRINT IMAGE_2; } ? I want to use this script in another file to display the image. the tag should be img

Re: [PHP] help in php script

2004-11-04 Thread Klaus Reimer
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

Re: [PHP] help in php script

2004-11-04 Thread Deepak Dhake
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

Re: [PHP] help in php script

2004-11-04 Thread Klaus Reimer
Deepak Dhake wrote: ?PHP print img src='TimeRotateImage.php'; ? did you get what i am saying? please let me know if you have some solution. thanks No. 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

Re: [PHP] help in php script

2004-11-04 Thread Klaus Reimer
Klaus Reimer wrote: This can't work. You browser tries to download an image with the name 'img src=c.jpeg'. Ah, I'm talking nonsense. I meant the browser tries to DISPLAY an image with the CONTENT 'img src=c.jpeg'. The browser can't do this. That's why you don't see anything. -- Bye, K