Jump to content

Recommended Posts

I have a PHP page that show's a picture but it only grab's the picture once.  If I refresh it all the stats on the page will refresh but the picture stay's the same.

I'm pretty sure the problem is in my php.ini and it is the php.ini-dist other than MySQL is enabled in it.

Here are the two PHP pages I'm using.  I'm a compleate PHP nub nub right now.  I'm working on learning it but am focusing on getting C++ down first.

Thanks

S1ay

 

PS.  File was Ziped with WinRAR.  At high compression.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/63230-image-refreshing/
Share on other sites

You could do it with javascript. Let me give you an example.

 

between the <head> and </head> tags of your site you place the following

<script>
function refreshimg()
{
  document.getElementById('stats').src = "stats.jpg";
  setTimeout("refreshimg();", 5000);
}
</script>

 

then call the function refreshimg() somewhere in your script, and create the image as below.

<img src = "stats.jpg" id = "refreshimg">

 

Sorry for it's not being PHP, but it might help you out :)

 

 

Link to comment
https://forums.phpfreaks.com/topic/63230-image-refreshing/#findComment-315215
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.