WindowsXP搜索PHP、XML等文件内的包含文字的设置方法
当我们用WINDOWS搜索某包含某文字的文件时,可以在“包含文字”处填上搜索词。但是一些不常见的后缀名文件WINDOWS不会搜索,如:,.log、.dll、.js、.asp、.xml、.xsl、.hta、.css、.wsh、.cpp、.c 或 .h等及无后缀名的文件。对于我等程序爱好者来说实在太不方便了,虽然有“文本替换大师”等软件能做这工作,但有时还是直接用WIN方便。
解决办法是,修改注册表:
打到如下子键:
HKEY_LOCAL_MACHINE \ SYSTEM\CurrentControlSet \ Control\ContentIndex
将 “FilterFilesWithUnknownExtensions”的 DWORD 值设置为 1。
搞定
相关文档:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XML文档操作管理器
&nb ......
编译安装php5.2.0时出错解决方案
1.错误信息...................如下
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS ......
<?php
function toFixLen($str,$len){ //固定长度字符串的截取
if($len>=strlen($str)||!$len) return $str;
$len-=3;
  ......
/*
用PHP的DOM控件来创建XML输出
设置输出内容的类型为xml
*/
header('Content-Type: text/xml;');
//创建新的xml文件
$dom = new DOMDocument('1.0', 'utf-8');
//建立<response>元素
$response = $dom->createElement('response');
$dom->appendChild($response);
//建立<books>元素并将其作 ......
假设xml文件是
<?xml version="1.0" encoding="gb2312" ?>
- <books auth="wren">
- <book id="B01">
<name>哈里波特 </name>
<price>10 </price>
<memo>这是一本很好看的书。 </memo>
</book>
- <boo ......