php include() to generate an xml file not working -


help needed.. can't figure out..

i have php file (a.php) read xml data , store mysql. then, have php file (b.php) generates xml file (c.xml) database. currently, have 2 cron jobs run a.php , b.php separately (hostgator shared hosting).

i tried include() execute b.php within a.php. seemed working c.xml did not refreshed (displaying old data). however, when ran b.php manually or using cron jobs, c.xml got refreshed (displaying updated data).

here summary of codes.

a.php

$doc = new domdocument; $xpath = new domxpath($doc); ... $query = "insert .."; ... include 'b.php'; 

b.php

$doc = new domdocument('1.0', "utf-8"); ... echo $doc->save('c.xml') . "\n"; 

thanks in advance!

==================================================

when run b.php manually, displays number (i think number of elements??) on b.php page , c.xml displays updated data.

when, run a.php b.php included, same number shown on a.php page c.xml not display updated data.

please advise..


Popular posts from this blog