解决方案 »

  1.   

    simxml 数据读出来后 写入数据库
      

  2.   

    每一行Item的数据都要写入MYSQL,我刚学PHP,望老师给个代码,谢谢!
      

  3.   

    $con=file_get_contents("http://vol.stock.hexun.com/charts/Close/Share/Info_3.ashx?code=600111");
    $xml = simplexml_load_string($con); 
     foreach($xml->Item as $v){ 
        $arr=(array)$v->attributes();
       $ar[]=$arr['@attributes'];
      
    }
    print_r($ar);   //形成一个二维数组。插入库应该难不倒你了吧!
      

  4.   

    我改了一下,用CURL会更加稳定,非常谢谢你。