?? opml.php
字號(hào):
<?
header("Content-type: text/xml; charset=gb2312");
$dbh=mysql_connect("localhost:3306","root","");
mysql_select_db("ajax");
$query="select * from opml order by ID";
$res=mysql_query($query, $dbh);
$err=mysql_error();
if($err){
exit();
}
echo "<?xml version=\"1.0\" encoding=\"gb2312\"?>";
?>
<opml version="1.0">
<head>
<title>Blog 列表</title>
<dateCreated></dateCreated>
<ownerName></ownerName>
</head>
<body>
<outline title="訂閱列表">
<?
while($row = mysql_fetch_array($res)) {
echo "<outline title=\"".XMLreplace($row["Title"])."\" htmlUrl=\"".$row["HtmlUrl"]."\" type=\"".$row["Type"]."\" xmlUrl=\"".$row["XmlUrl"]."\" lastDateTime=\"".$row["LastDateTime"]."\" ID=\"".$row["ID"]."\"/>\n";
}
?>
</outline>
</body>
</opml>
<?
function XMLreplace($str){
$str=str_replace("<","<",$str);
$str=str_replace(">",">",$str);
$str=str_replace("\"",""",$str);
return $str;
}
?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -