hmm, that's what I thought that the 2 includes should function sequentially ...
Here's the score in a bit more depth ...
It's a (developing offline) SMF forum with a custom theme ... In the header of the theme's template is a scrolling rss news ticker which takes its content from a locally cached XML file. The XML file is cached at user defined intervals by the freely available CaRP RSS caching script.
So ... in the custom "index template.php" I have put 2 simple includes as follows ...
// Invoke CaRP to update its locally cached XML file
// if the local file is out of date according to user
// defined update interval.
include 'carp.php';
// Display the horizontal scroller using the local XML file
// as its source for headlines
include 'rss2html.php';
CaRP does use fclose to finish writing the local XML file but it seems like "rss2html" tries to display the scroller with the data from the XML file before the XML file has been retrieved and updated thereby giving only a partially loaded page ...
As long as the XML exists and is closed the scroller displays fine ... it's only when CaRP is fopening, writing and fclosing that the scroller fails ...
I wonder if some kind of loop at the beginning of the rss2html script something like ...
"if file_exists display scroller else go back and check that the file exists again" ... or perhaps "if the file is open then continue till the file is closed" ?
Could that be done with the "continue" command perhaps ?
Thank you.