내 사이트의 시각화 도구를 만들기 위해 fusionchartsfree를 사용하고 있습니다.fusioncharts 그래프가 표시되지 않습니다.
아래 코드와 같이 샘플 페이지를 조정했습니다. 이것은 내 xampp에서 100 % 작동하지만 업로드 (hostgator에서 호스팅)하면 그래프를 표시하지 못합니다. 여기
내 코드입니다 :<?php
//We've included ../Includes/FusionCharts_Gen.php, which contains
//FusionCharts PHP Class to help us easily embed charts
//We've also used ../Includes/DBConn.php to easily connect to a database.
include("FusionCharts_Gen.php");
include("DBConn.php");
?>
<HTML>
<HEAD>
<TITLE>
Report Bar Chart
</TITLE>
<?php
//You need to include the following JS file, if you intend to embed the chart using JavaScript.
//Embedding using JavaScripts avoids the "Click to Activate..." issue in Internet Explorer
//When you make your own charts, make sure that the path to this JS file is correct. Else, you would get JavaScript errors.
?>
<SCRIPT LANGUAGE="Javascript" SRC="FusionCharts.js"></SCRIPT>
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.text{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</HEAD>
<BODY>
report
<CENTER>
<?php
//In this example, we show how to connect FusionCharts to a database.
//For the sake of ease, we've used an MySQL databases containing two
//tables.
// Connect to the Database
$link = connectToDB();
# Create pie 3d chart object using FusionCharts PHP Class
$FC = new FusionCharts("Pie3D","650","450");
# Set Relative Path of swf file.
$FC->setSwfPath("FusionCharts/");
//Store chart attributes in a variable for ease of use
$strParam="caption=Factory Output report;subCaption=By Quantity;pieSliceDepth=30; showBorder=1;showNames=1;formatNumberScale=0;numberSuffix= Units;decimalPrecision=0";
# Set chart attributes
$FC->setChartParams($strParam);
// Fetch all factory records usins SQL Query
//Store chart data values in 'total' column/field and category names in 'FactoryName'
$strQuery = "select factory_output.FactoryID as factoryid, factory_master.FactoryName as factoryname, sum(factory_output.Quantity) as total from factory_output, factory_master where factory_output.FactoryId=factory_master.FactoryId group by factory_output.FactoryId,factory_master.FactoryName";
$result = mysql_query($strQuery) or die(mysql_error());
//Pass the SQL Query result to the FusionCharts PHP Class function
//along with field/column names that are storing chart values and corresponding category names
//to set chart data from database
if ($result) {
$FC->addDataFromDatabase($result, "total", "FactoryName");
}
mysql_close($link);
# Render the chart
$FC->renderChart();
?>
</CENTER>
</BODY>
</HTML>
내가 잘못 가고 위치를 알려 수 있습니다하십시오? 언급 한 바와 같이 내 xampp에서 작동하지만 사용자 이름과 암호 만 데이터베이스에 대해 변경되었지만 mysql 로그인 오류가 발생하지는 않습니다. 그렇게 생각하지 마십시오.
그 밖에도 고상하고 신뢰할 수있는 다른 그래프 패키지를 사용하고 싶습니까?
감사합니다, 라이언