Code:
<?php
function genRandomString($len)
{
$chars = array(
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
"l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2",
"3", "4", "5", "6", "7", "8", "9"
);
$charsLen = count($chars) - 1;
shuffle($chars); // ½«Êý×é´òÂÒ
$output = "";
for ($i=0; $i<$len; $i++)
{
$output .= $chars[mt_rand(0, $charsLen)];
}
return $output;
}
$str = genRandomString(4); //ÊäÈëÒªÊäÈëµÄËæ»úÊýµÄ¸öÊý£»
$str .= "<br />";
$str .= genRandomString(4);
$str .= "<br />";
$str .= genRandomString(4);
echo $str;
?>
1. Êý¾Ý¿âÖÐÒÑ´´½¨´æ´¢¹ý³Ìuser_logon_check, PHPµ÷ÓÃʾÀýÈçÏÂ,
<?php
$dsn = 'mssql:dbname=MyDbName;host=localhost';
$user = 'sa';
$password = '666666';
try {
$dbCon = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
print 'Connection failed: '.$e->getMessage();
......
1. PEARµÄ°²×°, ÕâÀï½éÉÜÀûÓÃPHP5×Ô´øµÄBATÎļþ°²×°£¬ÐèÒªÄÜÉÏÍø¡£
a. ÔÚPHP5Ŀ¼ÏÂÕÒµ½go-pear.bat£¬Ë«»÷°²×°(±£Ö¤ÄÜÉÏÍø, ÒÔ±ãÏÂÔØ)£¬BAT×Ô¶¯´ÓÍøÉÏÏÂÔØPEARËùÐèµÄ¶«Î÷£»
b. °´ÕÕÌáʾÊäÈëһЩÉèÖÃÐÅÏ¢£¬Ö÷ÒªÊÇÒª°Ñ¾ÖÓòÍøµÄÍø¹Ø¼ÓÉÏ£¬Èçhttp://192.168.0.1:80/ , pearÒªÓÃÕâ¸öµØÖ··ÃÎÊInterne ......