时时商务社区

标题: PHP文本数据库的搜索方法 [打印本页]

作者: yj1281    时间: 2018-2-14 09:46

            PHP文本数据库的搜索方法 searchstr=("/".preg_quote($searchstr)."/"); //$searchstr是查找的关键字 $records=file($file);//获取所有的记录数 //$file是查找的数据文件 $search_reocrds=preg_grep ($searchstr, $records);//开始查找记录 //$search_reocrds为查找到的记录数 unset($records); if($search_records){ //开始显示记录,写下你自己的处理程序******************** while (list ($key, $val) = each ( $search_records)) { echo "$val
"; } //**************************************************** }
            
            
您可能感兴趣的文章:
  • php设计模式 DAO(数据访问对象模式)
  • PHP统计nginx访问日志中的搜索引擎抓取404链接页面路径
  • 实例讲解php数据访问
  • php数据访问之增删改查操作
  • php数据访问之查询关键字
  • PHP页面输出搜索后跳转下一页的处理方法
  • ThinkPHP使用getlist方法实现数据搜索功能示例
  • php注册审核重点解析(数据访问)
  • php出租房数据管理及搜索页面
            




    欢迎光临 时时商务社区 (http://bbs.4435.cn/) Powered by Discuz! X3.2