Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read/write to XML file in data folder
Really thank you for information. This day I found some solutions in web and make my first attempt to read/write XML.
I created simple XML test file and create PHP file.
In PHP file I wrote (just important part of code):

$doc = new DOMDocument();
$doc->load( 'nameofmyxmlfile.xml' );
echo $doc->childNodes->length;

After that I can access to my XML file, (I made tests and success I can read data form XML) but when I move it to GS folders it stopping working.
How I move it to GS:
In my custom template folder create xyz.php file and put all my php code here (of coures use this file as template for page in GS admin). To the same folder copied my sample XML file.
Everytime I refresh site echo function show 0 (zero) so not loading XML file (see line 3 of my code). Strange, outside of GS it working OK. I suppose some framework of GS block it, maybe I should put it in different folders.
Can you point me what I'm doing wrong?

Best wishes

Messages In This Thread
Read/write to XML file in data folder - by arek1 - 2013-05-17, 22:33:07
RE: Read/write to XML file in data folder - by arek1 - 2013-05-18, 03:43:06

Users browsing this thread: 1 Guest(s)