Page 1 of 1

looping only 1 function in a page

Posted: Thu Feb 05, 2004 3:42 am
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..

Posted: Thu Feb 05, 2004 5:48 am
by Pointybeard
Lost me on that one. What do you mean by 'refreshing' a function?

Posted: Thu Feb 05, 2004 10:58 am
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.

Posted: Thu Feb 05, 2004 11:22 am
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?

Posted: Thu Feb 05, 2004 11:41 am
by andylyon87
no that sounds good