flex读取配置文件与PHP交互圆饼图例子

作者:袖梨 2022-06-28

FLEX文件
teacherevalute.mxml

 代码如下 复制代码
 
 
            
         
   
 
 
     
     
     
     
 
     
     
     
     
     
 
     
     
     
      
        request xmlns="">  
            {optFlag} 
          
   
 
 
     
                    height="373"  
            width="575" 
            paddingRight="5"  
            paddingLeft="5"  
            showDataTips="true"  
            dataProvider="{medalsAC}" 
         fontSize="19" fontWeight="bold" x="35" y="10">           
             
             
                                    nameField="Country" 
                    labelPosition="callout"  
                    field="Gold"  
                    labelFunction="displayGold"  
                    calloutStroke="{callouts}"  
                    radialStroke="{radial}"  
                    stroke="{pieborder}" 
                    fills="{[sc1, sc2, sc3]}" 
                > 
                     
                     
                         
                   
 
                 
           
 
       
   
         
   
 
     
 
 

配置文件:

 代码如下 复制代码

 
 
http://192.168.8.108/armyDemo/phpsrc/ 
20 
 

 

PHP文件:

teacherevalute.php

 代码如下 复制代码

require_once (dirname(_FILE_) . '/dbcon/mysqlconnect.php'); 
 
//$optFlag=$_POST[optFlag]; 
 
 
$irt=MysqlConnect(); 
if($irt==0) 

     
    print errorMessage2xml("error"); 
    break; 

 
 
$SQL1 = "select count(*) as mm1 from tbl_class_evaluate  where class_evaluate =/"非常好/";"; 
 
$SQL2 = "select count(*) as mm2 from tbl_class_evaluate  where class_evaluate ='好';"; 
 
$SQL3 = "select count(*) as mm3 from tbl_class_evaluate  where class_evaluate ='差';"; 
 
$result1 = mysql_resultTo2DAssocArray($SQL1); 
 
$result2 = mysql_resultTo2DAssocArray($SQL2); 
 
$result3 = mysql_resultTo2DAssocArray($SQL3); 
 
$recXml='';    
 
$recXml.=$result1[0][mm1];    
 
$recXml.='
'; 
 
$recXml.=$result2[0][mm2]; 
 
$recXml.='
'; 
 
$recXml.=$result3[0][mm3]; 
 
$recXml.='
'; 
 
print $recXml; 
//print "result1-->".$result1[0][mm1].";".$result2[0][mm2]."<--result3--->".$result3[mm3]; 
?> 

相关文章

精彩推荐