站内搜索
分类列表
本类阅读排行
本类推荐文章
- 配置整合Win+Apache+PHP+MySQL+Tc...
- 动态网页制作PHP常用的正则表达式
- PHP实例:上传多个图片并校验的代...
- PHP5中新增加的日期(date)函数的常...
- PHP实例:实现给上传图片加水印图案
- PHP 开发中的中文编码问题
- 用PHP程序直接调用文本文件内容实...
- PHP初学者:配置Apache服务器并且...
- 详细学习PHP中对文件和目录的操作...
- 确保PHP安全,不能违反的四条安全...
- 怎样在PHP 中运用 SimpleXML 处理...
- PHP5.2+APACHE2.2+BugFree1.0的安...
- PHP正式进入IIS微软与Zend携手推动...
- PHP5中PDO的简单使用
- Web服务器IIS6的PHP最佳配置方法
广告
这个可是好东西,以后大家可能会用上哦:HTML to XHTML Converter
作者: 来源: 点击: 日期:2007-6-20 0:35:55
<?
if (!empty($type)) {
if ($type == "path") {
if (!empty($path)) {
if (file_exists($path) && is_file($path)) {
$file = file($path);
if (substr($file[0],0,9) != "<!DOCTYPE") $doctype=0;
$file = join('', $file);
} else {
die ("No such file.");
}
} else {
die ("No file specified.");
}
} elseif ($type == "file") {
if (!empty($file)) {
} else {
die ("No file specified.");
}
} else {
die ("No file specified.");
}
# specify html file, check for doctype
//$file = file("file.html");
//if (substr($file[0],0,9) != "<!DOCTYPE") $doctype=1;
//$file = join('', $file);
# make tags and properties lower case, close empty elements, quote all properties
这个可是好东西,以后大家可能会用上哦:HTML to XHTML Converter 评论
