PHP fopen/fclose or ajax - not finding file

517 Views Asked by At

I'm having issues with my module. There are different steps involved and I'm not sure where it is hanging up at.

I'm using an xml file for storage of data. When I add information via my php call, everything works fine. It is if I need to edit that same file right away that it seems that the ajax call to load the data cannot find the file.

1 - I use php on the server side to write the data from the html page to the xml file. I utilize fopen/fclose for this file.

2 - When I'm needing to edit the data, I read the file in and add the information.

3 - If I notice I have a typo or something and need to edit the data immediately afterwards, the ajax call doesn't find the file. But the file is there and has been written properly. If I wait like an hour or so and come back to it, it works fine too.

Is there something with fclose that may not be unlocking the file?

0

There are 0 best solutions below