Ò»¸ö¼òµ¥µÄPHPÐÂÎÅ·¢²¼ÏµÍ³
Ñ¿ÓêÔ´´PHPÐÂÎÅϵͳ½Ì³Ì£¨µÚÒ»°æ£©µÚÒ»½²£ºÓà phpmyadmin ½¨Á¢Êý¾Ý¿â
Ê×ÏȽ¨Á¢Ò»¸öÊý¾Ý¿â£¬ÃûΪ yayu ¡£ÔÚÕâ¸öÊý¾Ý¿âϽ¨Á¢Ò»¸öÊý¾Ý±í£¬ÃûΪ news ¡£ÏÂÃæ½øÈëÒ»¸öÖص㣬ÄǾÍÊÇÔÚ±í news Ͻ¨Á¢¸÷¸ö×ֶΡ£
ÄÇô£¬Ê²Ã´½Ð×Ö¶ÎÄØ£¿Í¨Ë׵㣬¾ÍÊÇÒ»ÀàÊÂÎïµÄ×ܳơ£±ÈÈç˵£¬ËùÓеÄÐÂÎÅ·¢±íʱ¼äÓÃÒ»¸öÃû´ÊÀ´´ú±í£¨´ÓżµÄ¾ÑéÀ´¿´£¬Óà phpmyadmin ½¨Á¢×ֶοÉÒÔÓÃÖÐÎÄ£¬µ«´ÓÏ°¹ßÀ´Ëµ»¹ÊÇÓÃÓ¢ÎÄ£¬Ã»°ì·¨£¬¼ÆËã»úÃÀ¹ú×îÅ£Â¡£Å¼ÃÇÓÓ time ”À´±íʾ¡£ÔÚ×ֶΠtime Ï¿ÉÒÔÓÐºÜ¶à“·¢±íʱ¼ä”£¬ÄÇôÈçºÎÀ´Çø·ÖÕâЩʱ¼äÄØ£¬Õâ¸ö¿ÉÒÔ²éѯÆäËü×Ö¶ÎϵÄÄÚÈÝ£¬±ÈÈçżÃǽ¨Á¢ÐÂÎŵıêÌâµÄ×Ö¶ÎΪ“ title ”£¬ title ×Ö¶ÎϵÄÄÚÈÝ°´ÕÕ³£Àí˵À´ÊÇûÓÐÒ»ÑùµÄ¡£ËùÒÔ¿ÉÒÔͨ¹ýÒ»¸ö±êÌâÀ´²éѯÕâ¸ö·¢±íʱ¼ä¡£ÆäʵÎÒÃÇ¿ÉÒÔÈÃÿ¸ö title »ò time ϵÄÄÚÈݶ¼¶ÔÓ¦Ò»¸ö±àºÅ£¬ÄǾÍÊÇ×ֶΗ—
“ id ”£º×ֶΓ id ”ÊÇÒ»¸öÈËÃÇĬÈϵÄÊ×Ñ¡×ֶΣ¬ÆäËü×Ö¶ÎϵÄÄÚÈÝ¿ÉÒÔÖظ´³öÏÖ£¬µ«Õâ¸ö×Ö¶ÎÈ´ÊÇ´Ó 1 ¿ªÊ¼Ôö´óµÄ°¢À²®Êý×Ö¡£ÔÚÉèÖÃÕâ¸ö×Ö¶Îʱ£¬ÒªÉèÖÃÖ÷¼ü¡¢Ë÷Òý¡¢Î¨Ò»ÒÔ¼° auto-increment ¡£Õâ¸ö auto-increment ¾ÍÊÇ×Ô¶¯Ôö¼ÓµÄÒâ˼¡£µ±ÈÎÒ»×Ö¶ÎÔö¼ÓÄÚÈÝʱ£¬Õâ¸ö×ֶξÍ×Ô¶¯Ôö¼Ó 1 £¬Ò²¾ÍÊÇ˵£¬ÈÎÒ»×ֶζ¼¶ÔÓ¦Ò»¸öΨһµÄ id £¬±ÈÈç 1 ¡¢ 2 ¡¢ 7 ……
ÏÂÃæ̸̸ÐÂÎŲ¿·Ö×ֶεĽ¨Á¢¡£
1. id £ºÒâÒåΪÿ¸öÐÂÎŵıàºÅ£¬ËüÊÇΨһµÄ£¬ÀàÐÍΪ tingint £¬Õâ¸ö tingint ÀàÐÍÎÞÐëÖ¸¶¨³¤¶È£¬ÏµÍ³Ä¬Îª 4 £»ÔÚ“¶îÍâ”ÖÐÑ¡Ôñ auto-increment £¬²¢Ñ¡ÔñÖ÷¼ü¡£
2. author £ºÒâÒåΪ×÷Õߣ¨ÐÂÎÅ·¢²¼ÈË£©£¬ÉèÖÃÀàÐÍΪ varchar £¬ÉèÖÃÕâ¸ö×ֶ㤶Èʱ£¬Èç¹û¿¼ÂÇ×÷Õß¾ùΪÖйúÈË£¬Ôò 8 ¸ö×Ö½ÚΪÉÏÏÞ£¨ 4 ¸öºº×Ö£©£¬µ«Èç¹û¿¼Âǵ½×÷Õß¿ÉÄÜΪÍâ¹úÈË£¬ 8 ¸ö×Ö½ÚÏÔȻ̫ÉÙÁË£¬¶ÔÆäËü×Ö¶ÎÒ²´æÔÚͬÑùµÄÎÊÌ⣬ÔÚÕâÀïżÃǰѳ¤¶ÈÉèÖÃΪ 8 °É¡£
3. title £ºÒâÒåΪÐÂÎűêÌ⣬ÀàÐÍΪ varchar £¬³¤¶ÈΪ 60 °É£¬ÊôÐÔΪ primany key ¡£
4. content £ºÒâÒåΪÐÂÎŵÄÄÚÈÝ£¬ÀàÐÍΪ text ¡£Õâ¸öÀàÐÍÎÞÐëÉèÖó¤¶ÈÁË¡£
5. source £ºÒâÒåΪÐÂÎŵÄÀ´Ô´£¬ÀàÐÍΪ varchar £¬³¤Îª 60 ¡£
6. date £ºÒâÒåΪ·¢±íʱ¼ä£¬ÀàÐÍΪ datetime £¬³¤¶ÈÎÞÐëÉèÖã¬ÊôÐÔΪ primany key ¡£
ÏÂÃæ²¹³äÒÔÏÂ×Ö¶ÎÀàÐ͵ÄÏà¹ØÄÚÈÝ£º
1 £® date £ºÊ±¼äºÍÈÕÆÚÀàÐÍ¡£Ê±¼äºÍÈÕÆÚÀàÐÍ»¹°üÀ¨ÒÔÏ£º
⊕ datetime : 0000-00-00 00:00:00
⊕ date: 0000-00-
Ïà¹ØÎĵµ£º
function multi($num, $perpage, $curpage, $mpurl) {
$multipage = '';
$mpurl .= strpos($mpurl, '?') ? '&' : '?';
if($num > $perpage) {
$page = 10;
$offset = 5;
$pages = @ceil($num / $perpage);
if($pag ......
The define() function defines a constant.
define()º¯ÊýµÄ×÷ÓÃÊÇ£º¶¨ÒåÒ»¸ö³£Á¿¡£
Constants are much like variables, except for the following differences:
³£Á¿[constant]Óë±äÁ¿[variable]ÓкܶàÏàËƵĵط½£¬Òò´Ë£¬ºÜÈÝÒ×»ìÏý£»ÏÂÃ棬ÎÒÃÇÁоÙһϳ£Á¿[constant]Óë±äÁ¿[variable]Ö®¼äµÄ²»Í¬µã£º
A constant's ......
//Èç¹û$waitAckSecΪ0£¬Ôò·µ»Ø³É¹¦·¢Ë͵Ä×Ö½ÚÊý
//Èç¹û$waitAckSec´óÓÚ0£¬Ôò·µ»Ø·¢Ëͺó½ÓÊÕµ½µÄÄÚÈÝ
//ÈκÎÇé¿öÏ£¬Ê§°Ü¶¼·µ»ØFALSE
function SendUDP($host, $port, $buff, $waitAckSec=0)
{
$result = FALSE;
$socket = ($result=@socket_create(AF_INET, SOCK_DGRAM, SOL_U ......
¹ØÓÚPHPµÄ»º´æ¼¼ÊõÎÒ¸öÈ˵Ķ¨ÒåÊÇ¿ÉÒÔ·Ö³É3¸öÀà±ð1;
»º´æÄ£¿éÕâÕâ¸öÊÇÔÚ·þÎñÆ÷ÉÏ×öµÄ»º´æÉèÖÃ, ±ÈÈçZend¹«Ë¾µÄCache²úÆ·µÈ, Ö÷ÒªÔÀíÊÇͨ¹ý¶ÔPHP´úÂëÎļþµÄÒ»´Î±àÒë±£´æÔÚÄÚ´æÖÐ, ͨ¹ý¼õÉÙI /OµÄ²Ù×÷À´¼Ó¿ì·ÃÎÊËÙ¶È, ²»ÔÚ±¾ÎÄÌÖÂÛ·¶Î§Ö®ÁÐ2;
HTML·½Ê½»òÐíÄã˵PHPÉú³ÉHTMLµÄ·½Ê½²»ÔÚ±¾ÎÄÌÖÂ۵ķ¶Î§Ö®ÁÐ, µ«ÊÇÎÒ¸öÈËÈËΪÕâÖ ......
PHP ³£Á¿ dirname(__file__)
__FILE__ :±»³ÆΪPHPħÊõ³£Á¿ ,·µ»Øµ±Ç°Ö´ÐÐPHP½Å±¾µÄÍêÕû·¾¶ºÍÎļþÃû,°üº¬Ò»¸ö¾ø¶Ô·¾¶
1£©dirname(__FILE__) º¯Êý·µ»ØµÄÊǽű¾ËùÔÚÔڵķ¾¶¡£
±ÈÈçÎļþ b.php °üº¬ÈçÏÂÄÚÈÝ£º
<?php ......