Hello,
I am trying to render a Gantt chart in Wordpress. I am created the xml file on the fly with data from MySQL tables, saving the xml and then calling it with the new FusionCharts function. However, I am getting an "Error in loading data".
I have the php files saved as template filed in a child directory under my theme directory and the script runs fine when creating the xml files. However, if I under the Network tab in the browser debugger, I am getting 404 errors when trying to read the xml files.
The code that I am using to read them is
$readchartfilename = "./wp-content/themes/uncode-lite/ocga_pages/".$chartname.".xml";
$columnChart = new FusionCharts("gantt", $chartId, "100%", 200, $chartname, "xmlurl", $chartfilename);
If I run an echo on the getcwwd() - I get /home2/calypso/public_html/ogca and on $readchartfilename, I get - ./wp-content/themes/uncode-lite/ocga_pages/LadybirdFarms.xml.
But the files that the FusionCharts function is under the folder of the page name (farm-crop-production) URL -
http://mydomain.com/ogca/farm-crop-production/wp-content/themes/uncode-lite/ocga_pages/LadybirdFarms.xml
Would appreciate any assistance.
Thanks
Steve