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

crontabÀïÔËÐÐphpÎÞ·¨Á¬½Óµ½Êý¾Ý¿â

ÎÒÔÚmy.cnfÖÐ×¢Ê͵ôlog-bin=mysql-binºÍbinlog_format=mixedºó,ÎÞ·¨Æô¶¯mysql
ÎÒÖØÆôvpsºó,ÄÜÆô¶¯mysqlÀ²
ÓÃweb·½Ê½ÔËÐÐphp,Õý³£
µ«ÊÇÔÚcrontabÀïÖ´ÐеÄphp½Å±¾,Ìáʾ: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) ²é¿´µ½/var/lib/mysql/Ŀ¼ÏÂ,ÓÐÒ»¸ömysql.sockÎļþ,ÊÇÒ»¸ö¿ì½Ý·½Ê½µÄͼ±ê,Á¬½Óµ½/tmp/mysql.sockÎļþ.
µ«ÊÇÎÒµÄmy.cnfÀïÉèÖõÄsocket        = /tmp/mysql.sock ÏëÆð֮ǰÎʹýÕâ¸öÎÊÌâ CentOSϵͳ°²×°ÁËLNMP°üÖ®ºóÔÙ×°php-mysql,³öÏÖsocket´íÎó È»ºóÓÖÕÒµ½Ò»ÆªÎÄÕ Can¡¯t connect to local MySQL server through socket ½â¾ö°ì·¨ °´ÎÄÕµÄÌáʾ²é¿´ÁË/var/lib/mysql/mysql.sock ÎļþµÄȨÏÞ,ÊÇwww:www ÓÃchown mysql:mysql /var/lib/mysql.sock ÃüÁîÐ޸ĺóÕý³£. Ææ¹ÖµÄÊÇ,֮ǰÔÚcrontabÒ»Ö±ÄÜÔËÐÐphp,ÖØÆôVPSºó²Å²»Õý³£µÄ,ÄѵÀÖØÆôVPS»áµ¼ÖÂ/var/lib/mysql.sockµÄȨÏ޸ıä??


Ïà¹ØÎĵµ£º

PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©

Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server  ......

phpÈý°å¸«——ÇëÇóºÍ»á»°

 phpÊÇÒ»Ãżòµ¥¶øÓÖÇ¿´óµÄÓïÑÔ£¬ËùÓеÄphpÊé¼®¶¼»áÕâÑù˵£¨Ë­ÈÃÎÒ×î°®¿´Ç°ÑÔÄØ£©¡£Èç¹û½«.net¡¢jsp±È×÷µ¶½££¬ÄÇôphp¾ÍÊǸ«Í·¡£Ñ§»á³ÌÒ§½ðµÄÈý°å¸«£¬Ëä²»ÄÜÌìÏÂÎ޵У¬È´¿ÉÒÔ°²ÉíÁ¢Ãü¡£
½ñÌìÔÛÃÇѧϰµÚÒ»°å¸«£¬ÍøÕ¾½»»¥µÄ»ù´¡£ºÇëÇóºÍ»á»°¡£
PHPÖпͻ§¶ËÓë·þÎñÆ÷ÐÅÏ¢µÄ´«µÝÊÇÒÀ¿¿ÇëÇóÓ¦´ðºÍ»á»°±£³ÖʵÏֵģ¬¶øPHP¶ÔÓÚ ......

uchome¶þ´Î¿ª·¢ php³ÌÐò½²½â£¨common.phpÎļþ½âÎö£©

index.phpÎļþµÚÒ»ÐоÍÊÇ°üº¬ÁË
include_once('./common.php');
ÎļþËùÒÔÏȶÔcommon.phpÎļþ½âÎö
<?php
/*
[UCenter Home] (C) 2007-2008 Comsenz Inc.
$Id: common.php 10981 2009-01-14 03:05:20Z liguode $
*/
//¶¨ÒåÒ»¸ö³£Á¿£¬ÓÃÀ´ÔÚÆäËûÒ³ÃæÖУ¬·ÀÖ¹±»¶ñÒâÓû§Ö±½Óµ÷ÓÃÆäËûPHPÎļþ¡£
@def ......

php+ajaxÖÐÖÐÎÄÊä³ö£¯ÊäÈëÂÒÂëÎÊÌâ

ÏÈ˵ͨ¹ýjavascript·¢ËÍʱµÄÂÒÂëÎÊÌ⣬Èç¹û·¢Ë͵ÄÊÇÖÐÎÄ£¬¾ÍÒªÓÃescapeÕâ¸öº¯Êý´¦Àí£¬±ÈÈ磺
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
var url="testurl.php?name="+"¸Õ¸Õ";
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
ÄÇô¾ÍÒª¸Ä³É
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
var url="testurl. ......

PHP CURLÏê½â

ÉùÃ÷£º²¹³ä·­ÒëÁËÔ­ÌûÖм¸´¦Î´·­Òë´¦¡£
---------------------------------------------------- תÌû¿ªÊ¼ -------------------------------------------------------
PHPÖеÄCURLº¯Êý¿â£¨Client URL Library Function£© 
curl_close - ¹Ø±ÕÒ»¸öcurl»á»° 
curl_copy_handle - ¿½±´Ò»¸öcurlÁ¬½Ó×ÊÔ´µÄËùÓÐÄÚÈݺ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ