PHPÊý×Ö¼ÓÃܽâÃÜÀà
<?php
/* ----------------------------------------------------------------------------
* Script Name: encrypt.php
* Creation Date: 2008-4-7 10:36
* Last Modified: 2008-4-12 16:00
* Author: meyu
* Copyright (c) 2007
* Purpose: Êý×Ö×Ö·û´®¼òÒ×¼Ó½âÃÜ
* ----------------------------------------------------------------------------*/
class Encryption {
/**
* ×îÖÕµÄÃÜÎÄ´úÂ룬¿ÉÉèΪÈÎÒâ²»Öظ´µÄ10λӢÎÄ×Ö·ûa-zA-Z
*/
private $replacement = 'urskydMeIV';
/**
* Ôö¼ÓµÄÃÜÎĵÚһ룬¿ÉÉèΪ1λ³ý0ÒÔÍâµÄÕûÊý£¬¼´ 1-9
*/
private $prefix = "8";
/**
* ¹«Ô¿,³¤¶ÈСÓÚ8λµÄÕýÕûÊý
*/
private $match = "111111";
/**
* ת»»ºó¶ÔÕÕÊý×é
*/
private $replaceenc;
private $replacedec;
function __construct() {
for($i =0; $i < 10; $i++) {
$this->replaceenc['/'.$i.'/'] = $this->replacement{$i};
$this->replacedec['/'.$this->replacement{$i}.'/'] = $i;
}
}
public function encrypt($str) {
return preg_replace(
array_keys($this->replaceenc),
$this->replaceenc,
$this->mynotin(preg_replace("/(.)(.)/", "${2}${1}", $str))
);
}
public function decrypt($str) {
return preg_replace("/(.)(.)/", "${2}${1}",
$this->mynotout(preg_replace(array_keys($this->replacedec),$this->replacedec,$str))
);
}
private function mynotin($str) {
$str_out = "";
$i = 0;
while(isset($str{7*$i})) {
$str_out .= (($this->prefix.substr($str, $i*7, 7))+0)^$this->match;
$i++;
}
return $str_out;
}
private function mynotout($str) {
$str_out = "";
$i = 0;
while(isset($str{8*$i})) {
$str_out .= substr((substr($str, $i*8, 8)+0)^$this->match, 1);
$i++;
}
return $str_out;
}
}
?>
Ïà¹ØÎĵµ£º
PHP µÄ´íÎ󱨸æ
display_errors = Off
error_reporting = E_ALL
display_errors ÊÇ·ñÏÔʾ´íÎó¡£Ä¬ÈÏÖµÊÇ Off¡£ÒªÈÿª·¢¹ý³Ì¸ü¼ÓÇáËÉ£¬Çë°ÑÕâ¸öÖµÉèΪ On£º
display_errors = On
error_reporting ±äÁ¿µÄĬÈÏÖµÊÇ E_ALL¡£Õâ¸öÉèÖûáÏÔʾ´Ó²»Á¼±àÂëʵ¼ùµ½ÎÞº¦Ìáʾµ½³ö´íµÄËùÓÐÐÅÏ¢¡£E_ALL ¶ÔÓÚ¿ª·¢¹ý³ÌÀ´ËµÓеã̫ϸ ......
<?
$fp = fsockopen ("passport.baidu.com", 80,
$errno, $errstr, 30);
if (!$fp) {
echo "$errstr
($errno)<br>\n";
} else {
$msg="GET
/?login&username=lapiaotuan22&password=oyhz123456
HTTP/1.0\r\n";
$msg.="Host:passport.baidu.com \r\n&quo ......
Ò»¡¢ÈçºÎÑ¡Ôñ PHP5.3 µÄ VC9 °æ±¾ºÍ VC6 °æ±¾
VC6 °æ±¾ÊÇʹÓà Visual Studio 6 ±àÒëÆ÷±àÒëµÄ£¬Èç¹ûÄãµÄ PHP ÊÇÓà Apache À´¼ÜÉèµÄ£¬ÄÇÄã¾ÍÑ¡Ôñ VC6 °æ±¾¡£
VC9 °æ±¾ÊÇʹÓà Visual Studio 2008 ±àÒëÆ÷±àÒëµÄ£¬Èç¹ûÄãµÄ PHP ÊÇÓà IIS À´¼ÜÉèµÄ£¬ÄÇÄã¾ÍÑ¡Ôñ VC9 °æ±¾¡£
¶þ¡¢ÈçºÎÑ¡Ôñ PHP5.3 µÄ Thread Safe ºÍ Non Thread S ......
1 ÔÚSQLÓï¾äÖпÉͨ¹ýÌí¼ÓÏÞÖÆÌõ¼þ:left(text,20)ֻȡtextÎı¾µÄÇ°20¸ö×Ö;
¡¡¡¡2 ¿ÉÒÔÓÃlimit fromRecord, RecordNum À´×÷Ϊ·ÖҳʹÓÃ,±ÈÈçlimit 0,30±íʾ´ÓµÚÒ»¸ö¼Ç¼¿ªÊ¼±éÀú30¸ö¼Í¼;
¡¡¡¡3 Á½¸ö±íµÄÁ¬½Ó¿ÉÒÔÊÇ£ºtable1 join table2 using x(xΪÁ½¸ö±íµÄ¹«¹²×Ö¶Î),»òÕßÊÇtable1 join table2 on table1.x = table2.x
¡¡¡ ......
<?php
/*
* Created on 2010-3-11
* author:zhangfei
*ÎÒµÄÑéÖ¤ÂëÀà
*/
session_start();
class Check_Class{
public $h_img ;
public $c_back ;
public $c_front ;
//¹¹Ô캯Êý
function Check_Class(){
$h_img = imagecreate(100,30);
......