比如说把下列代码生成一个以时间命名的XML文件: <?xml version="1.0" encoding="gb2312" ?>
<html author="axgle">
<head>
<title>this is title</title>
</head>
<body>
<p id="1">this is p1</p>
<p id="2">this is p2</p>
</body>
</html>请达人指点。。谢谢!~~给分。。
<html author="axgle">
<head>
<title>this is title</title>
</head>
<body>
<p id="1">this is p1</p>
<p id="2">this is p2</p>
</body>
</html>请达人指点。。谢谢!~~给分。。
解决方案 »
- curl 看高手过来,如何采集GOOGLE 现在返回302
- php下的msword和pdf浏览下载怎么实现
- 根据ip判断地址!!!
- 请教各位关于php连接Mysql的语句,帮我看看哪里不对了。
- 有没有谁用过或看过Sina之类的内容管理系统。他们系统的结构或思路是怎么样的?谁能谈谈?
- 分页类 大家PP
- 请问,大家能否提供些,php连接和操作FB1.5的例程,我好象用php怎么都操不了FB的!!
- 怎样用打印机打印页面的某一部分?
- 请问如何判断客户端的cookie是否是打开的。如何实现了?
- 萌新瑟瑟发抖,关于超链接
- 求救:有人不断恶意通过软件来访问某一个页面,造成数据库负载很大(唠叨请进)。
- 简单替换问题(在线等)
<html author="axgle">
<head>
<title>this is title</title>
</head>
<body>
<p id="1">this is p1</p>
<p id="2">this is p2</p>
</body>
</html>';
$filename = time().'.xml';
$fp = fopen($filename, 'w');
fwrite($fp, $content);
fclose($fp);确保你有对应目录的写入权限先,
http://www.ibm.com/developerworks/cn/opensource/os-xmldomphp/