日期:2014-05-17  浏览次数:20472 次

我想加数据库 要怎么加呀 我不知道呀 那个给我解释
[code=XML][/code]<?xml version="1.0" encoding="utf-8"?>
<item>
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>  
  </list>  
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani2.flv" >
  <thumb>thumb/2.jpg</thumb>  
  </list> 
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>  
  </list>  
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani2.flv" >
  <thumb>thumb/2.jpg</thumb>  
  </list>
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>  
  </list>  
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani1.flv" >
  <thumb>thumb/2.jpg</thumb>  
  </list>
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>  
  </list>  
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani1.flv" >
  <thumb>thumb/2.jpg</thumb>  
  </list>
   
   
</item>

------解决方案--------------------
PHP code
<?php
$xml=<<<XML
<?xml version="1.0" encoding="utf-8"?>
<item>
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>   
  </list>   
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani2.flv" >
  <thumb>thumb/2.jpg</thumb>   
  </list>  
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>   
  </list>   
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani2.flv" >
  <thumb>thumb/2.jpg</thumb>   
  </list>
  <list name="Intro something.Please custom your title text content" videotitle="Matrix film demo 1" link="video/ani1.flv" >
  <thumb>thumb/1.jpg</thumb>   
  </list>   
  <list name="Intro something.Please custom your title text content" videotitle="Final matrix demo 2" link="video/ani1.flv" >
  <thumb>thumb/2.jpg</thumb>   
  </list>
  <list name="Intro something.Please custom y