looping only 1 function in a page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

looping only 1 function in a page

Post by andylyon87 »

I would like to know if there is a way of looping or refreshing just one function, say just refreshing a fopen function. Would it be possible to do this in the one file or would I have to use a separate file for the read function and use require(fileread.php) etc..
User avatar
Pointybeard
Forum Commoner
Posts: 71
Joined: Wed Sep 03, 2003 7:23 pm
Location: Brisbane, AUS
Contact:

Post by Pointybeard »

Lost me on that one. What do you mean by 'refreshing' a function?
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Post by andylyon87 »

All i want is for one function to refresh whilst others don't so say if a fopen function refreshed whilst the rest didn't, that way it would show the most up to date information.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

php is server side so you cant really get it to just refresh on part of the page. What you can do is use something like an iframe and then have javascript reload that frame every so often - that will call the page from the server again and php will generate the latest version of what ever data the page shows.

Is this what your looking for? Or have i got the wrong end of the stick?
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Post by andylyon87 »

no that sounds good
Post Reply