mysql+php
php£«mysqlÔúʵ¸öÈË»ù±¾¹¦
Ò». 10¾ä»°
1.²»ÒªÒÀÀµregister_global=ONµÄ»·¾³£¬´ÓÄã¸Õ¶®µÃÅäÖÃphpÔËÐл·¾³ÉõÖÁÉв»Ã÷°×register_globalµÄON/OFF»á¶Ô×Ô¼ºÓÐʲôӰÏìµÄÄÇÌìÆ𣬾ÍÓ¦¸ÃÓ¸ҵذÑËüÉèΪOFF.
2.д³ÌÐòÇ°¿´¿´ÔõôÓÃerror_reporting.
3.²»¶®¾ÍÎʱ¾Éíû´í£¬µ«ÄãÐèÒªÔÚÄÇ֮ǰ²é²éÊֲᡣ
4.µ±È»£¬ÄãÐèÒª¶®µÃʹÓÃÊֲᡣÊÖ²áÉÏÕÒ²»µ½´ð°¸µÄʱºò£¬Ó¦¸Ã¿¼ÂÇÏÂÍøÂçÉϵÄËÑË÷ÒýÇæ¡£
5.¸Õѧ»áphp+mysqlÖ®ºó£¬²»Òª½ÐÈÂ×ÅҪдÂÛ̳£¬ÒªÐ´XXX¡£ÒªÃ÷°×£¬¸Õѧ»áдºº×Ö²¢²»±íʾÄãÓÐÄÜÁ¦Ð´Ê«¡£
6.ÔÚѧweb±à³ÌµÄʱºò£¬ÄãÓ¦¸ÃÏÈÈ¥ÈÏʶhtmlÕâ¸öÅóÓÑ¡£
7.ÓеãÄÜÁ¦ºó£¬ÊÔׯشðÐÂÊÖµÄÎÊÌ⣬²»Òª¿´µ½×Ô¼º¶®µÄ¶ø±ðÈ˲»¶®¾ÍÕ´Õ´×Ôϲ£¬ÈÓÏÂÒ»Ãû“¼òµ¥£¬ÄÇÊÇ»ù±¾µÄ¶«Î÷”¾Í×߸üÒª²»µÃ¡£
8.˼¿¼ÊÇÒ»¸öºÃÏ°¹ß£¬²»¶¯ÊÖȥд¾ÍµÈÓÚ¿ÕÏ룬ʲôҲûÓС£
9.дºÃÒ»¶Î³ÌÐò£¬Èç¹û¾õµÃºÜÂúÒ⣬һÖܺóÔÙ¿´Ò»±é£¬Ò²ÐíÄã»áÈÏΪËüÓ¦¸ÃÓÐËù¸Ä±ä
10.Óпն࿴¿´±ðÈ˵ijÌÐò£¬ÕÒ³öËûÈ˵IJ»×ã»òÓŵ㣬×Ô¼ºµàÁ¿¡£
¶þ. ¸÷È¡ËùÐè
1.ÉÆÓÚʹÓÓÒýÓÔ,ËüÄÜÖ±½ÓÓ°Ïìµ½³ÌÐòµÄЧÂÊ¡£
2.ÉÆÓÚÓÃÈýÔªÔËËã×Ó,¿ÉÒÔÈóÌʽ½Ï¾«¼òÓÐЧÂÊ¡£
±ÈÈç:
PHP´úÂë:
if ($data[$i]['nickname'])
{
$nickname = $data[$i]['nickname'];
}
else
{
$nickname = $data[$i]['ip'];
}
¿ÉÒÔд³É:
PHP´úÂë:
$nickname = $data[$i]['nickname'] ? $data[$i]['nickname'] : $data[$i]['ip'];
3.ÉÆÓÚ×éÖ¯if...else...»ØȦ
±ÈÈç:
PHP´úÂë:
$ext_name = strtolower(str_replace(".", "", strrchr($upfilename, ".")));
if (!empty($type))
{
if (!strpos($type, $ext_name))
{
echo "Please upload the file of $type form.";
exit();
}
}
ÉÏÃæµÄ´úÂëÄãÓ¦¸Ãд³ÉÕâÑù:
PHP´úÂë:$ext_name = strtolower(str_replace(".", "", strrchr($upfilename, ".")));
if (!($type==='') && strpos($type, $ext_name)===false)
{
echo "Please upload the file of $type form.";
exit();
}
4.¾¡Á¿ÈÃÄãµÄ´úÂëÇåäÀЩ
Èç¹ûд³ÉÕâÑù£¬ÊDZȽÏÈÃÈËÍ·Í´µÄ:
PHP´úÂë:
$foo=$_post["foo"];
$username=$_post["user"];
$group=$_POST["group"];
Ïà¹ØÎĵµ£º
Èç¹ûͬÒâϵͳÖÐͬʱ´æÔÚinstall mysqlºÍno—install mysql£¬ÄÇôÔõÑù½øÐÐÁ½¸ö°æ±¾µÄÇл»Ê¹ÓÃÄØ£¿ÓÖ»áÓöµ½Ê²Ã´ÑùµÄÎÊÌâÄØ£¿
Ê×ÏÈ£¬install mysqlµÄmysql·þÎñÊÇĬÈÏÆô¶¯µÄ£¬ÔÚÈÎÎñ¹ÜÀíÆ÷½ø³ÌÖпÉÒÔ¿´µ½¼¸ÌõsqlµÄ×ÖÑÛ£¬Èçmysqld.exe,sqlbrowser¡£ÕâÊÇinstall mysqlµÄ·þÎñ¡£ÄÇôͨ¹ý¿ì½Ý·½Ê½»ònavicat¾ÍÄÜÆô¶¯Ê¹ÓÃinstall ......
grant all on *.* to root@'192.168.10.131' identified by 'admin';
LOAD DATA INFILE (´ÓÎļþÖе¼ÈëÊý¾Ý)
mysqldump -u pivot -p pivot news > c:\news.sql
ÄÇô»¹Ô¿ÉÒÔmysqlÃüÁmysql -u Óû§Ãû -p (ÃÜÂë) -h Ö÷»úÃû --one-database »¹ÔÊý¾Ý¿âÃû < ·¾¶/±¸·ÝÃû.bak,--one-databaseÊÇÖ¸ ......
ÎÒд¹ýµÄ½Ì³Ì²»¶à£¬¶øÇҴ󲿷ֶ¼ÊÇÀ´Ô´ÓÚ±ðÈ˵Ľ̳̣¬²»¹ý£¬ÕâÀïËù½éÉܵģ¬¶¼ÊÇÈÚÈëÎÒËù×ܽáµÄ¾Ñ飮££ÒýÑÔ
¡¡¡¡
¡¡¡¡PHPµÄÖ´ÐÐЧÂÊÊÇÓÐÄ¿¹²¶ÃµÄ£¬ÕâÒ²ÊÇÎÒϲ»¶ËüµÄÔÒòÖ®Ò»£¬ºÍËü³ÆΪ¾øÃî´îµµµÄMysqlÒÔ¼°ApacheÏëÈںϣ¬²»Äܲ»¾ªÌ¾ÆäЧÂÊÁË¡£PHP¸üÐÂÒ²ºÜ¿ì£¬ÕâÀïÁоÙÁËÄ¿Ç°×îа汾PHP4.3.2RC4£¨¼¸ºõûÓÐBUGÁË£¬¹À¼ÆÐ´Í ......
תÔØ×Ô£ºhttp://www.neatstudio.com/index-4.shtml
ÎÄÕÂÀ´×Ô¼Åįhacker,http://hi.baidu.com/isbx/blog/item
/08ef48547ef1ad58574e00bf.html:
µ±Ç°µÄWeb¿ª·¢ÕßÖп϶¨Óв»ÉÙÈËûÓÐ×¢Òâµ½×÷ÕßËùÌáµ½µÄÕâÁ½¸öÎÊÌâµÄ¡£
µÚÒ»¸öÎÊÌâÊÇÕâÑùµÄ£¬MySQLĬÈÏÓÐÒ»¸öÅäÖòÎÊý
max_packet_size£¬Õâ¸ö²ÎÊýÊÇÓÃÓÚÏÞÖÆMySQL¿Í»§¶ËºÍMy ......