您的位置: 首页
9月92014
php的一个验证码程序
<?php
session_start();
$length=4;
$mode=1;
$type='png';
$width=48;
$height=22;
$verifyName='verify';
$chars='ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23...阅读全文
评论:0条
9月92014
linux下squid开多个端口的办法
visible_hostname fu_host1
#设定squid的主机名,如无此项squid将无法启动
http_port 80 accel vhost vport
http_port 48888 accel vhost vport
#设定squid为accel加速模式,vhost必须要加.否则将无法将主机头转发至后端服务器,...阅读全文
评论:0条
9月82014
PHP完美的提取链接正则
function match_links($document) {
preg_match_all("'<\s*a\s.*?href\s*=\s*([\"\'])?(?(1)(.*?)\\1|([^\s\>]+))[^>]*>?(.*?)</a>'isx",$document,$links); ...阅读全文
评论:0条
9月82014
php弹出该元素,删除该元素在原来数组中的位置
function _array_pop($key,&$array)
{
if(array_key_exists($key,$array))
{
$tmp=$array[$key];
unset($array[$key]);
return $tmp;
...阅读全文
评论:0条
9月32014
8月282014
8月282014
php中替换换行符的三个方法
//php 有三种方法来解决
//1、使用str_replace 来替换换行
$str = str_replace(array("\r\n", "\r", "\n"), "", $str);
//2、使用正则替换
$str = preg_replace('//s*/', '', $str);
/...阅读全文
评论:0条
8月282014
php将文件夹下文件列表出来
<!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/xh...阅读全文
评论:0条
8月262014
PHP 神盾解密工具
<?php
rename_function('gzuncompress','new_gzuncompress');
override_function('gzuncompress', '$arg', 'print(new_gzuncompress($arg)); return new_gzuncompress($arg)...阅读全文
评论:0条
8月232014