bonjarno Report post Posted July 17, 2009 Hi, I am including all code. First are the 2 lines I edited as per documentation, relevant to my server set up. The last code is the entire PHP body of code in my test file. If you want, you can also execute this exact page by going to the following URL: http://dev.nsninsight.com/TestFCExport.php the 2 lines changed are: define ( "SAVE_PATH", "/var/www/nsninsight/chartexporttest/" ); and define ( "HTTP_URI", "http://dev.nsninsight.com/chartexporttest/" ); Now for my PHP (this is the entire contents of the PHP page above!!!): <? $PageTitle = "FC Export Test"; print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>"; print "<html>"; print "<head>"; print "<META HTTP-EQUIV='Pragma' CONTENT='no-cache'>"; print "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"; print "<link rel='stylesheet' href='css/nsnstyle.css' type='text/css'>"; print "<title>InSight $PageTitle</title>"; print "<script type='text/javascript' language='JavaScript' src='fusioncharts/FusionCharts.js'></script>"; ?> <script type="text/javascript"> function FC_Exported(objRtn) { if (objRtn.statusCode == "1") { alert('yay! jpg generated...'); } else { alert('boo! jpg NOT generated...'); } } </script> <? print "</head>"; print "<body>"; $servername = $_SERVER['SERVER_NAME']; print "<hr>Server Name: ". $servername. "<hr>"; $FilePath = "chartexporttest/"; if (!is_dir($FilePath)) mkdir($FilePath, 0777); $ChartFile = "Pie3D.swf"; $ChartData = "<chart caption='Fusion Chart Export Test' bgColor='ccccff' showBorder='0' exportEnabled='1' exportAtClient='0' exportAction='Save' exportHandler='http://dev.nsninsight.com/ExportHandlers/FCExporter.php' exportFileName='FCExportTest'>"; $ChartData .= "<set label='Bob' value='1' />"; $ChartData .= "<set label='Carol' value='2' />"; $ChartData .= "<set label='Ted' value='3' />"; $ChartData .= "<set label='Alice' value='4' />"; $ChartData .= "</chart>"; print "<div id='chartdiv' align='center'>Chart Space...</div>"; print "<script type='text/javascript'>"; print "var myChart = new FusionCharts('fusioncharts/$ChartFile', 'myChartId', '500', '400', '0', '1');"; print "myChart.setDataXML("$ChartData");"; print "myChart.render('chartdiv');"; print "</script>"; print "</body>"; print "</html>"; ?> Share this post Link to post Share on other sites