Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[PHP]PDOµ÷Óô洢¹ý³Ì

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();
exit;
}
$username = '123';
$userpsw = '123';
//$xp_userlogon = $dbCon ->query("exec user_logon_check '$username','$userpsw'");
//mysql->call user_logon_check('$username','$userpsw');
//mysql->call user_logon_check(?,?)
$xp_userlogon = $dbCon->prepare('exec user_logon_check ?,?');
$xp_userlogon->bindParam(1,$username);
$xp_userlogon->bindParam(2,$userpsw);
$xp_userlogon->execute();
$uCol = $xp_userlogon->columnCount();
echo $uCol."<br>";
while($row = $xp_userlogon->fetch()){
for( $i=0; $i<$uCol; $i++ )
print $row[$i]." ";
print "<br>";
}
?>


Ïà¹ØÎĵµ£º

PHP: How to Get the Current Page URL

Sometimes, you might want to get the current page URL that is shown
in the browser URL window. For example if you want to let your visitors
submit a blog post to Digg you need to get that same exact URL. There
are plenty of other reasons as well. Here is how you can do that.
Add the followin ......

Ö§³ÖUCenterµÄPHP½¨Õ¾³ÌÐòÒ»ÀÀ

½¨Õ¾³ÌÐòÊÇÕ¾³¤ÔËÓªÍøÕ¾µÄ¸ù±¾£¬ÈçºÎ½áºÏÕûºÏ¸÷¸ö²»Í¬ÏµÍ³µÄ³ÌÐò¡¢Êý¾Ý±í¡¢¼Ü¹¹£¬ÌṩͳһµÄÍøÕ¾»áԱϵͳ£¬Ò»Ö±ÊÇÀ§ÈźܶàÕ¾³¤µÄÎÊÌ⣬¶øʹÓÃUCenter¿ÉÒÔ½ÏΪ¼òµ¥µÄʵÏÖ²»Í¬ÏµÍ³Ö®¼äµÄÕûºÏÎÊÌâ¡£
¡¡¡¡UCenterÊÇ¿µÊ¢´´ÏëÍƳöµÄÃâ·Ñ¿ªÔ´µÄ½¨Õ¾¹¤¾ß£¬ÊǸ÷¸ö½¨Õ¾²úÆ·Ö®¼äÐÅÏ¢Ö±½Ó´«µÝµÄÒ»¸ö¹¤¾ß£¬¿µÊ¢µÄTeamÔÚÆäDiscuzÂÛ̳ÉÏÊÕ ......

phpÖе¥ÒýºÅºÍË«ÒýºÅÇø±ð

1 PHPÖе¥ÒýºÅÓëË«ÒýºÅµÄÇø±ð  
¡¡¡¡ÔÚPHPÖУ¬Í¨³£Ò»¸ö×Ö·û´®±»¶¨ÒåÔÚÒ»¶ÔÒýºÅÖУ¬È磺
'I am a string in single quotes'
"I am a string in double quotes"
¡¡¡¡PHPÓï·¨·ÖÎöÆ÷ÊÇÓóɶԵÄÒýºÅÀ´ÅжÏÒ»¸ö×Ö·û´®µÄ¡£Òò´Ë£¬ËùÓÐ×Ö·û´®±ØÐëʹÓÃͬһÖÖµ¥»òÕßË«
ÒýºÅÀ´¶¨Ò忪ʼºÍ½áÊø¡£ÀýÈ磬ÏÂÃæµÄ×Ö´®¶¨ÒåÊ ......

PHPÑéÖ¤ÂëÉú³É½Å±¾£¨5λÊý×Öpng¸ñʽ£©


<?php
header("Content-Type:image/png");
srand((double)microtime()*1000000);
$img_height=20;
$img_width=60;
$im=@imagecreate($img_width,$img_height) or die("²»Äܳõʼ»¯GDÎļþÁ÷");
$background_color=imagecolorallocate($im,255,255,255);
$text_color=imagecolorallocate($im,233,14,91);
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ