PHPÂëÅ©½ø»¯Ê·1_Zend
Zend-PHP±àÂë¹æ·¶
1.¶ÔÓÚÖ»°üº¬PHPµÄÎļþ£¬"?>"ÊDz»ÔÊÐí´æÔڵġ£×¢ÊÍ£º·Àֹĩβ±»ÒâÍâµÄ×¢Èë¿Õ°×²¢ÏÔʾÊä³ö¡£
2.Ëõ½øӦʹÓÃËĸö¿Õ¸ñµÄËõ½ø£¬¶ø²»Ê¹ÓÃÖƱí·ûTAB¡£
3.Ò»ÐÐ80¸ö×Ö·ûÊDZȽϺÏÊʵģ¬×î¶àΪ120×Ö·û¡£
4.ÐеĽáÊø·ûÖ»ÄÜÊDZê×¼µÄUNIXÎı¾ÎļþµÄ»»ÐУ¬»»ÐзûÔÚÎļþÖбíʾΪ10£¬»ò16½øÖÆµÄ 0x0A¡£
²»ÒªÊ¹ÓÃwindowsµÄ»Ø³µ»»ÐÐ×éºÏ(0x0D,0x0A)¡£
5.ÀàµÄÃüÃûÖ»ÔÊÐíÓÐ×ÖĸÊý×Ö×Ö·û£¬²»¹ÄÀøʹÓÃÊý×Ö¡£Ï»®ÏßÖ»ÔÊÐí×ö·¾¶·Ö¸ô·û¡£ÀýÈçZend/Db/Table.phpÎļþ¶ÔÓ¦µÄÀàµÄÃû³ÆΪZend_Db_Table¡£Èç¹ûÀàÃû°üº¬¶à¸öµ¥´Ê£¬ÄÇôÿһ¸öµ¥´ÊµÄµÚÒ»¸ö×Öĸ±ØÐë´óд¡£Á¬ÐøµÄ´óдÊDz»ÔÊÐíµÄ£¬Èç"Zend__PDF"ÊDz»ÔÊÐíµÄ£¬¶ø"Zend_Pdf"ÊÇ¿ÉÒÔ½ÓÊܵġ£*Óû§µÄ´úÂë×îºÃ²»ÒªÒÔZend_¿ªÍ·¡£
6.½Ó¿ÚÀà¹æ¶¨Í¬ÉÏ£¬µ«×îºó±ØÐëÒÔ"Interface"½áβ¡£Èç"Zend_Pdf_Interface".
7.Ö»ÓÐ×ÖĸÊý×Ö×Ö·û£¬Ï»®ÏߺͶ̺áÏß"-"¿ÉÓ㬿ոñÊDz»ÔÊÐíµÄ¡£
°üº¬ÈκÎphp´úÂëµÄÎļþ±ØÐëÒÔ".php"À©Õ¹ÃûΪ½áβ.ͬÑùÐèÒª×ñÑÀàÃûµÄ¹æÔò.
8.º¯ÊýÃûֻʹÓÃ×ÖĸÊý×Ö×Ö·û£¬²»¹ÄÀøʹÓÃÊý×Ö,Ï»®ÏßÊDz»ÔÊÐíµÄ¡£
º¯ÊýÃû×ÜÊÇÒÔСд¿ªÍ·£¬µ«º¯ÊýÃû°üº¬¶à¸öµ¥´Ê£¬Ã¿¸ö×ÓµÄÊ××Öĸ±ØÐë´óд£¬×ñÑ“Íշ唸ñʽ¡£
¹ÄÀøʹÓó¤µÄÃû×Ö£¬ÕâÑùÈÝÒ×Àí½â´úÂë¡£
¶ÔÓÚÃæÏò¶ÔÏó±à³Ì£¬¶ÔÏóµÄ·ÃÎÊÆ÷×ÜÊÇÒÔ"get","set"Ϊǰ׺¡£µ±Ê¹ÓÃÉè¼ÆģʽÈ絥̬ģʽ(singleton)»ò¹¤³§Ä£Ê½(factory),·½·¨µÄÃû×ÖÓ¦µ±°üº¬Ä£Ê½µÄÃû×Ö£¬ÕâÑùÈÝÒ×´ÓÃû×Öʶ±ðÉè¼Æģʽ.
ÔÚ¶ÔÏóÖеķ½·¨£¬ÉùÃ÷Ϊ"private"»ò"protected"µÄ£¬Ãû³ÆµÄÊ××Ö·û±ØÐëÊÇÒ»¸öµ¥¸öµÄÏ»®Ïߣ¬ÕâÊÇΨһµÄÏ»¬ÏßÔÚ·½·¨Ãû×ÖÖÐʹÓõķ½·¨¡£ÉùÃ÷Ϊ"public"µÄ´Ó²»ÒÔÏ»®Ïß¿ªÍ·¡£
È«¾Öº¯Êý£¨"floating functions"£©ÔÊÐíµ«ÊDz»¹ÄÀøʹÓ㬽¨Òé°ÑÕâÀຯÊý·â×°µ½¾²Ì¬ÀàÀï¡£
9.±äÁ¿Ö»°üº¬Êý×Ö×Öĸ×Ö·û£¬²»¹ÄÀøʹÓÃÊý×Ö£¬Ï»®Ïß²»½ÓÊÜ¡£
ÉùÃ÷Ϊ"private"»ò"protected"µÄÀà³ÉÔ±±äÁ¿Ãû±ØÐëÒÔÒ»¸öµ¥¸öÏ»®Ïß¿ªÍ·£¬ÕâÊÇΨһµÄÏ»®ÏßÔÚ±äÁ¿ÃûÖеÄÓ÷¨£¬ÉùÃ÷Ϊ"public"µÄ´Ó²»ÒÔÏ»®Ïß¿ªÍ·.
±äÁ¿Ãû×ÜÒÔСд×Öĸ¿ªÍ·²¢×ñÑ“ÍÕ·åʽ”ÃüÃûÔ¼¶¨¡£
¹ÄÀøʹÓÃÈß³¤µÄÃû×Ö£¬ÕâÑùÈÝÒ×Àí½â£¬³ý·ÇÔÚСѻ·ÖУ¬²»¹ÄÀøʹÓüò½àµÄÃû×Ö"$i"»ò"$n"Ö®ÀàµÄ¡£
Èç¹ûÓÐÒ»¸öÑ»·³¬¹ýÁË20ÐдúÂ룬Ë÷ÒýµÄ±äÁ¿Ãû×Ö±ØÐëÓиöÃèÊöÐÔÒâÒåµÄÃû×Ö¡£
²úÁ¿°üº¬Êý×Ö×Öĸ×Ö·û¶ñ»¯Ï»®Ïߣ¬Êý×ÖÔÊÐí×÷Ϊ³£Á¿Ãû¡£
³£Á¿Ãû×ÖËùÓÐ×Öĸ±ØÐë´óд.
²úÁ¿Öеĵ¥´Ê±ØÐë¼ÓÏ»¬Ïß¡£
²úÁ¿±ØÐëͨ¹ý"const"¶¨ÒåΪÀàµÄ³
Ïà¹ØÎĵµ£º
ÎÊÌ⣺Failed loading /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ZendOptimizer.so: /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied
Failed loading /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ZendOptimize ......
PHP³ÉΪÊÀ½çÉÏ×îÁ÷ÐеĽű¾ÓïÑÔÓÐÐí¶àÔÒò£ºÁé»îÐÔ£¬Ò×ÓÃÐԵȵȡ£µ«Í¨³£Ö»ÓÃPHP»òÕßÆäËûÓïÑÔ±àÂë¾Í»áÏԵõ¥µ÷¡¢Öظ´£¬Õâʱºò¾ÍÐèÒªÒ»¸öPHP¿ò¼ÜÀ´´úÌæ³ÌÐòÔ±Íê³ÉÄÇЩÖظ´²»±äµÄ²¿·Ö¡£±¾ÎÄͨ¹ý»Ø´ðWhat, When, Why ÒÔ¼° WhichÕâЩÎÊÌ⣬½«¶ÔPHP¿ò¼Ü½øÐÐÈ«Ãæ½âÎö¡£
¡¡¡¡PHP¿ò¼ÜÊÇʲô£¿
¡¡¡¡PHP¿ò¼ÜÌṩÁËÒ»¸öÓÃÒÔ¹¹½¨ ......
¹²3¸öÎļþ
IncDB.phpÊý¾Ý¿âÁ¬½Ó
index.phpÊ×Ò³
InsetToDB.phpÊý¾Ý¿â²Ù×÷
Êý¾Ý¿âlguestbookÀïÃ潨±í
CREATE TABLE `intd` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) character set utf8 collate utf8_bin N ......
//ÓÃÕâ¸öheaderÖ¸ÁîÀ´½â¾öURLÖØд²úÉúµÄ404 header
header('HTTP/1.1 200 OK');
// Ò³ÃæûÕÒµ½
header('HTTP/1.1 404 Not Found'); ......
(PHP 4 >= 4.0.4)
¹¦ÄÜ˵Ã÷£ºCheck for numeric character(s)
Description
bool ctype_digit ( string text)
Returns TRUE if every character in text is a decimal digit, FALSE otherwise.
Àý×Ó 1. A ctype_digit() example
<?php $strings = array('1820.20', '10002', 'wsl!12'); foreach ($strings ......