ѸËÙѧ»áPHP¼ÓÃܽâÃܼ¼ÇÉ
Ïл°ÉÙ˵,ÏȽ«ËüÃÇ´ò°ü³ÉÒ»¸öÎļþ¾Í½Ðfun.php°É
< ?php
function passport_encrypt($txt, $key) {
srand((double)microtime() * 1000000);
$encrypt_key = md5(rand(0, 32000));
$ctr = 0;
$tmp = '';
for($i = 0;$i < strlen($txt); $i++) {
$ctr = $ctr == strlen($encrypt_key) ? 0 : $ctr;
$tmp .= $encrypt_key[$ctr].($txt[$i]
^ $encrypt_key[$ctr++]);
}
return base64_encode(passport_key($tmp, $key));
}
function passport_decrypt($txt, $key) {
$txt = passport_key(base64_decode($txt), $key);
$tmp = '';
for($i = 0;$i < strlen($txt); $i++) {
$md5 = $txt[$i];
$tmp .= $txt[++$i] ^ $md5;
}
return $tmp;
}
function passport_key($txt, $encrypt_key) {
$encrypt_key = md5($encrypt_key);
$ctr = 0;
$tmp = '';
for($i = 0; $i < strlen($txt); $i++) {
$ctr = $ctr == strlen($encrypt_key) ? 0 : $ctr;
$tmp .= $txt[$i] ^ $encrypt_key[$ctr++];
}
return $tmp;
}
?>
ÒÔÏÂÊÇһЩʾÀý…¼ÓÉî¶ÔÕâÈý¸öPHP¼ÓÃܽâÃܺ¯ÊýµÄÀí½â…
//string.php < ?php include “fun.php”; $txt = “This is a test”; $key = “testkey”; $encrypt = passport_encrypt($txt,$key); $decrypt = passport_decrypt($encrypt,$key); echo $txt.”< br>< hr>”;
Ïà¹ØÎĵµ£º
³ÌÐò·Ç×èÈûģʽ£¬ÕâÀïÒ²¿ÉÒÔÀí½â³É²¢·¢¡£¶ø²¢·¢ÓÖÔÝÇÒ¿ÉÒÔ·ÖΪÍøÂçÇëÇó²¢·¢
ºÍ±¾µØ²¢·¢
¡£
ÏÈ˵һÏÂÍøÂçÇëÇó²¢·¢
ÀíÂÛÃèÊö
¼ÙÉèÓÐÒ»¸öclient£¬³ÌÐòÂß¼ÊÇÒªÇëÇóÈý¸ö²»Í¬µÄserver£¬´¦Àí¸÷×ÔµÄÏìÓ¦¡£´«Í³Ä£Ð͵±È»ÊÇ˳ÐòÖ´ÐУ¬ÏÈ·¢Ë͵ÚÒ»¸öÇëÇ󣬵ȴýÊÕµ½ÏìÓ¦Êý¾ÝºóÔÙ·¢Ë͵ڶþ¸öÇëÇó£¬ÒÔ´ËÀàÍÆ¡£¾ÍÏñÊǵ¥ºËCPU£¬Ò»´ÎÖ»ÄÜ´ ......
rsync ÊÇÒ»¿î¸ßЧµÄÔ¶³ÌÊý¾Ý±¸·ÝºÍ¾µÏ󹤾ߣ¬¿É¿ìËÙµØͬ²½¶ą̀Ö÷»ú¼äµÄÎļþ£¬Æä¾ßÓÐÈçÏÂÌØÐÔ£º
Ö§³ÖÁ´½Ó¡¢ËùÓÐÕß¡¢×éÐÅÏ¢ÒÔ¼°È¨ÏÞÐÅÏ¢µÄ¿½±´£»
ͨ¹ýÔ¶³Ì shell£¨ssh, rsh£©½øÐд«Ê䣻
ÎÞÐëÌØÊâȨÏÞ¼´¿É°²×°Ê¹Óã»
Á÷Ë®ÏßʽÎļþ´«Êäģʽ£¬Îļþ´«ÊäЧÂʸߣ»
Ö§³ÖÄäÃû²Ù×÷£»
ͨ¹ýÔ¶³Ì shell ·½Ê½£º
rsync [OPTION] [USE ......
¿´yii¿ò¼ÜÔ´ÂëµÄʱºò£¬·¢ÏÖÁË
ReflectionClassÕâ¸ö·½·¨£¬²Å·¢ÏÖÔÀ´ÊÇphp5µÄж«Î÷£¬ÓÚÊÇÉÔ΢Ñо¿ÁËÏ¡£phpµÄ·´ÉäapiÒ»¹²ÓУº
class
Reflection
{ }
interface Reflector
{ }
class
ReflectionException
extends
Exception
{ }
class
Re ......
²½ÖèÒ»£º´î½¨»·¾³
1£¬Ê×ÏȲ鿴ÄãµÄphpÀ©Õ¹Ä¿Â¼ÏÂÊÇ·ñÓÐphp_gettext.dllÕâ¸ö
Îļþ£¬Èç¹ûûÓУ¬Õâ¾ÍÐèÒªÄã
ÏÂÔØÒ»¸ö»òÊÇ´ÓÆäËûµØ·½¿½±´Ò»¸ö£¬È»ºó·Åµ½phpÀ©Õ¹Ä¿Â¼¡£
2£¬´ò¿ªphp.ini£¬²é
ÕÒ”;extension=php_gettext.dll“ £¬È»ºóÈ¥³ý×¢ÊÍ£¬ÖØÆôapache¡£
²½Öè¶þ:ÔÀí½²½â
¼ÙÈçÄãµÄû
Óйú¼Ê»¯µÄ³ÌÐòÀïÓÐÕâÑù ......
In the directory where you plan to install Elgg, do the following:
Create the file .htaccess and add these two lines
RewriteEngine on
RewriteRule ^testing.php$ modrewrite.php
This tells the webserver to load modrewrite.php when testing.php is
requested.
In order to get this test to work on ......