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

PHP»ñÈ¡ä¯ÀÀÆ÷ÐÅÏ¢£¨ÈýÖÖ£©

ת×Ô±¾È˸öÈËÍøÕ¾ ¡¾PHP̽·Õß
¡¿£¬»¶Ó­¸÷λ·ÃÎÊÕ¾µã£¡
ÔÚʹÓÃPHP»ñÈ¡ä¯ÀÀÆ÷ÐÅϢʱ£¬Í¨³£ÓÐÁ½ÖÖ·½Ê½£º
µÚÒ»ÖÖÊÇ£ºÊ¹ÓÃ$_SERVER[HTTP_USER_AGENT]Ñ¡Ïî
´Ë·½Ê½»ñÈ¡µÄÊǸñʽ²»¹æÔòµÄÊý¾Ý£¬Èç
Mozilla/4.0 (compatible; MSIE 8.0
; Windows NT 5.1; Trident/4.0; GTB6; CIBA; .NET CLR 2.0.50727)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.33
Safari/532.0
¾ßÌåä¯ÀÀÆ÷ÐͺÅÐèÒª×Ô¼º·ÖÎö²ÅÄÜ»ñÈ¡£¬·Ö±ðÊÇ IE8¡¢Firefox/3.5.5¡¢
Chrome/3.0¡£
µÚ¶þÖÖÊÇ£ºÊ¹ÓÃPHPµÄget_browser(£©º¯Êý
ÔÚʹÓô˺¯Êýʱ£¬Ò»°ã»áµÃµ½ÈçϾ¯¸æ
“Warning
: get_browser() [function.get-browser
]: browscap ini directive
not set. in …”
ͨ¹ý²é¿´PHPÊÖ²á¿ÉÒÔÖªµÀ£¬Õâ¸öº¯ÊýµÄʹÓÃÊÇÓÐÌõ¼þµÄ£º
Note
: In order for this to
work, your browscap configuration setting in php.ini
must point to
the correct location of the browscap.ini
file on your
system.
browscap.ini
is not bundled with PHP, but you may find an
up-to-date »
php_browscap.ini
file here.
While browscap.ini
contains
information on many browsers, it relies on user updates to keep the database
current. The format of the file is fairly self-explanatory.
Òâ˼ÊÇ˵£ºÎªÁËʹÓÃÕâ¸öº¯Êý£¬Äã±ØÐëÔÚphp.iniÎļþÀïÃæÔö¼ÓÒ»¾äÖ¸Ïò browscap.ini
ÎļþµÄÅäÖã¬browscap.iniÎļþÀïÃæ¼Ç¼ÁËËùÓÐÒÑ´æÔÚµÄä¯ÀÀÆ÷µÄÀàÐͼ°ÆäÐÅÏ¢£¬
ËùÒÔÄãÒªÏÂÔØ×îеÄÕâ¸öÎļþ£¬ÏÂÔØbrowscap.iniºó·Åµ½·þÎñÆ÷ij¸öλÖã¬get_browser()ÔÚʹÓÃʱ¾ÍÊǽ«»ñÈ¡µÄ¿Í»§¶ËÐÅÏ¢Óë´ËÎļþ½øÐжԱȣ¬Èç¹ûÄÜÕÒµ½£¬Ôò·µ»ØÏàÓ¦ÀàÐÍ¡£
ÕâÑù¿´À´µÚ¶þÖÖ·½Ê½ÓÐЩ¸´ÔÓ£¬ÆäʵҲÓиüºÃµÄ·½Ê½£¬ÄǾÍÊǵÚÈýÖÖ:
µÚÈýÖÖ£ºÊ¹ÓÃÒÑÓеŦÄÜÇ¿´óµÄ¿ªÔ´´úÂë¡£
¹úÍâÓиö½Ðmavrick
µÄ
ÍøÕ¾£¬ÉÏÃæÓйØÓÚä¯ÀÀÆ÷µÄÏîÄ¿£¬Ò»Ö±¸üÐÂËùдµÄBrowser
À࣬ÎÒ×îп´µ½µÄÕâ¸öÀà¿ÉÒÔ»ñÈ¡°üÀ¨iPhone¡¢BlackBerry¡¢win¡¢mac¡¢linux¡¢OS¡¢BeOSµÈƽ̨ÉϵÄä¯ÀÀÆ÷ÐÅÏ¢£¬¹¦ÄÜ¿ÉÒÔ˵ÊÇÊ®·ÖÇ¿´ó¡£ÏÂÔØÕâ¸öÎļþʱҪ¸ù¾Ý×Ô¼ºÊ¹ÓõÄPHP°æ±¾È¥Ñ¡Ôñ¡£
Click here
for an
example.
PHP5
Browser v1.6 Detection Page
PH


Ïà¹ØÎĵµ£º

¼ÌÐøÕª³­£º½ÌÄãÓÃPHPдMySQLÊý¾Ý¿âµÄÓû§ÈÏ֤ϵͳ

Óû§ÈÏÖ¤µÄÔ­ÀíºÜ¼òµ¥£ºÊ×ÏÈÐèÒªÓû§ÔÚÒ³ÃæÉÏÌîÈëÓû§ÃûºÍÃÜÂ룬µ±È»Ã»×¢²áµÄÓû§ÐèÒªÏÈ×¢²á¡£È»ºóµ÷ÓÃÊý¾Ý¿âËÑË÷ÊÇ·ñÓÐÏàÓ¦µÄÓû§¡£Èç¹ûÓоÍÈ·ÈÏ£¬Ã»ÓÐÔòÌáÐÑÓû§ÏÈ×¢²á¡£Ê¹ÓÃPHPÀ´Íê³ÉÕâÒ»Çкܼòµ¥£¬µ«ÐèҪעÒâµÄÊÇÈç¹ûÏëÔÚÒÔºóµÄÒ³ÃæÖж¼ÄÜÈ·ÈÏÓû§Éí·Ý¡£
µÚÒ»²½ÊÇ×öÒ»¸öµÇ¼µÄÒ³Ãæ¡£
µÚ¶þ²½¿ªÊ¼µÇ¼ºóµÄÈ·ÈϳÌÐòµÄÉ ......

PHPÁ¬½ÓMySQL

<?php
/**
* Mysql DB
*
* @author Administrator
* @package defaultPackage
*/
class MySqlDB{
private $_db;
private static $_instance;
private function __construct(&$db_type){
global $connectionstr;
$conn_db=$connectionstr[$db_type];
$this->_db=mysql_pconnect($conn ......

PHPѧϰ±Ê¼Ç

1.Ö±½ÓʹÓÃmysql_insert_id()»ñÈ¡ÉÏÒ»´Î²åÈëµÄÊý¾ÝµÄAUTO_INCREMENTµÄ±äÁ¿µÄ±àºÅ£¬±ÈʹÓÃmysqlÓï¾ä»ñÈ¡·½±ã¼«¶à¡£µ«×¢ÒâÒªÔÚquery()ºóÁ¢¿ÌʹÓ㬱£Ö¤Ê±¼äÕýÈ·ÐÔ£¬Èç¶àÏ̷߳ÃÎÊÊý¾Ý¿âÊDzúÉúÎó²î¡£
2.µÈºÅ×óÓÒ¸÷ÁôÒ»¿Õ¸ñ£¬ÇåÎú±ãÓÚÔĶÁ¡£
3.PHPÖУ¬µ¥Ë«ÒýºÅ¾ù¿ÉÒÔÌ×string£¬Çø±ðÔÚÓÚ£º
"this is a simple $test" = 'this i ......

PHPÄ£°åÒýÇæ

ÓÃPHPдһ¸ö×Ô¼ºµÄÄ£°åÒýÇæ
2009-07-11 09:51
SmartyÒ»Ö±±»ÈËÊÓΪÊǶàÓàµÄ¶«Î÷£¬ÎÒ¾õµÃÈÏΪSmarty¶àÓàµÄÈ˲ÅÊǶàÓàµÄ....²»ËµÕâЩÁË¡£½ñÌìÎҾͽ̴ó¼Òд¸öÄ£°åÒýÇ棬Èôó¼Ò¶¼¿ÉÒÔдһ¸öÊôÓÚ×Ô¼ºµÄÄ£°åÒýÇ棬¶øÇÒ¿´ÍêÕâƪÎÄÕÂÖ®ºó£¬Äã¶ÔSmartyµÄÈÏʶ»á¸ü½øÒ»²½µÄ¡£ÎÒµÄÄ£°åÒýÇæÃû½ÐStupid£¨"ɵ¹Ï"µÄÒâ˼£©£¬ÎÒ²»Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ