php 全文搜索和实现替换的代码
摘要:<?php exec("/bin/grep -r '$oldword' $rootpath", $results, $errorCode); if ($errorCode){ if ($errorCode == 1){ echo "Possibly no files were found with ?$oldword in them \n"; } echo "OS E...
阅读全文
用php截取utf-8中文字符串乱码的解决方法
摘要:去年底,特别是11月12月比较忙,过年休息了一个月,3月也忙了一阵,就没有在这边发博客,现在把之前发的一些转发过来,毕竟这边看的人会多一些.用php截取utf-8中文字符串乱码的解决方法: 在PHP中截取UTF-8编码的字符串时,有可能碰到半字符的问题,也就是乱码,以下函数可以解决这个问题: function utf8_substr($str,$len) { for($i=0;$i<$l...
阅读全文
AJAX 表格字段数据排序,点击表头每列排序
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=g
阅读全文