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

linux PHP »·¾³´î½¨

Ò»¡¢µÇ½
1.½øÈëlinux
2.̞: root
3.¿ÚÁî:123456
4.mysql Óû§Ãû root ÃÜÂë 123456
¶þ¡¢Æô¶¯mysqlÓëapache·þÎñ
1.Æô¶¯mysqÊý¾Ý¿â:/usr/local/mysql/bin/./mysqld_safe --user=mysql &
2.Í£Ö¹mysqlÊý¾Ý¿â:/usr/local/mysql/bin/mysqladmin -u root -p shutdown
3.Æô¶¯apache: /usr/local/apache2/bin/./apachectl start
4.Í£Ö¹apache£º/usr/local/apache2/bin/./apachectl stop
5.ÖØÆôapache£º/usr/local/apache2/bin/./apachectl restart
Ò²¿ÉÒÔʹÓà £º/usr/local/apache2/bin/./apachectl (-k)¿É¼Ó start/stop/restart
Èý¡¢ÂÛ̳µÄ°²×°Ä¿Â¼
1.Ó¦Óð²×°Ä¿Â¼£º/usr/local/apache2/htdocs/
2.
ËÄ¡¢Êý¾Ý¿â»¹Ô­Ó뱸·Ý
½øÈëµ½mysql°²×°Ä¿Â¼µÄbin\
 Ö´ÐÐmysqldump -u root(Óû§Ãû) -p bbs(Êý¾Ý¿âÃû) --default-character-set=gbk (°´Ö¸¶¨×Ö·û¼¯µ¼³ö)  >d:/bbs.sql(µ¼³öλÖÃ)
--mysql Êý¾Ý¿â±¸·ÝÓ뻹ԭÀý
1.µ¼³ö£º
 /usr/local/mysql/bin/mysqldump -u root -p bbs --default-character-set=gbk >d:/bbs.sql
2.Êý¾Ý»¹Ô­
 ½øÈëmysql\bin\ Ö´ÐÐ mysql -u root -p bbs --default-character-set=gbk<d:\bbs.sql
µ¼È룺
 mysql -u root -p superclub --default-character-set=gsr/local/superclub20090625bak.sql
×¢ÒâÇмǣºµ¼È룬µ¼³ö±ØÐëʹÓÃͬһ×Ö·û¼¯¡£
Îå¡¢³£ÓÃÃüÁî
1.ÏÔʾÖÐÎÄÃüÁexport LANG=GBK
2.²é¿´ÎļþÄÚÈÝÃüÁî vi XXXÎļþ
3.viÖÐÍ˳ö дÈë Ç¿ÐÐÍ˳ö Ç¿ÐÐдÈë ²éѯ q, wq, q£¡, wq£¡, :²é¿´
4.½øÈëmysqlÃüÁ/usr/local/mysql/mysql -u root -p
5.¸ü¸ÄÎļþ¼Ð»òÎļþµÄ¶ÁдȨÏÞ£º chmod -R 777 bbs£»
6.ÏÔʾÎļþ·¾¶ÃüÁî £ºpwd£»
7.²é¿´½ø³Ì


Ïà¹ØÎĵµ£º

Socket±à³Ì£ºÓÉLinuxÏòWindowsÒÆÖ²ÎÊÌâ


ת×Ô£ºhttp://www.cic.tsinghua.edu.cn/jdx/book1/CHAPTER3.htm
 
ÔÚÔ´Îļþ¿ªÊ¼Ôö¼Ó#include <winsock.h>Óï¾ä¡£
µ÷ÓÃWSAStartup()º¯Êý³õʼ»¯Windows Sockets DLL£¬²¢ÔÚ½áÊøʱµ÷ÓÃWSACleanup()º¯Êý֪ͨWindows Sockets DLLÊÍ·Å×ÊÔ´¡£
½«Ì×½Ó×ÖµÄÀàÐÍΪint¸ÄΪSOCKET¡£
»ñÈ¡¡¢ÉèÖôíÎóÂ벻ҪʹÓÃÈ«¾Ö±äÁ¿er ......

Linuxϵͳµ÷ÓÃ


¹¦ÄÜÃèÊö£º
»ñȡһЩÎļþÏà¹ØµÄÐÅÏ¢¡£
Ó÷¨£º
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int stat(const char *path, struct stat *buf);
int fstat(int filedes, struct stat *buf);
int lstat(const char *path, struct stat *buf);
²ÎÊý£º
path£ºÎļþ ......

LinuxµÄoopsÄں˵÷ÊÔÐÅÏ¢

      Oops¿ÉÒÔ¿´³ÉÊÇÄں˼¶µÄSegmentation Fault¡£Ó¦ÓóÌÐòÈç¹û½øÐÐÁË·Ç·¨ÄÚ´æ·ÃÎÊ»òÖ´ÐÐÁË·Ç·¨Ö¸Á»áµÃµ½SegfaultÐźţ¬Ò»°ãµÄÐÐΪÊÇcoredump£¬Ó¦ÓóÌÐòÒ²¿ÉÒÔ×Ô¼º½Ø»ñSegfaultÐźţ¬×ÔÐд¦Àí¡£Èç¹ûÄÚºË×Ô¼º·¸ÁËÕâÑùµÄ´íÎó£¬Ôò»á´ò³öOopsÐÅÏ¢¡£´¦ÀíÆ÷ʹÓõÄËùÓеØÖ·¼¸ºõ¶¼ÊÇͨ¹ýÒ»¸ö¸´ÔÓµÄÒ³± ......

php °²È«

ÈçºÎ²»Ê¹ÓÃprepared statment£¬¶øÊÇÓùýÂ˵ķ½·¨±ÜÃâSQL×¢ÈëÄØ£¿
Ò»°ãÀ´Ëµmysql×Ô´øµÄ¹ýÂ˺¯ÊýÊDZȽϿɿ¿µÄ¡£mysql_real_escape_string()
µ«ÊÇÕâ¸öº¯ÊýÔÚijЩ×Ö·û¼¯ÖÐÓÐÎÊÌ⣬±ÈÈçGBK¡£Èç¹ûÄãÓÃUTF8ÄÇû¹Øϵ¡£
ÔÚPHPÀïÉèÖÃÊý¾Ý¿âµÄ×Ö·û¼¯²»Ó¦¸ÃÓãºmysql_query("SET NAMES UTF8");
¶øÓ¦¸ÃÓãºmysql_set_charset()
ÕâÑù ......

PHPÏÂeregʵÏÖÆ¥ÅäipµÄÕýÔò


$ip = "1.1.1.255".chr(0)."haha";
if(ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$",$ip)) {
echo $ip;
} else {
echo "unknown";
}
Õâ¸öeregÕýÔòÏÞÖÆÁË$ipµÄÊý¾ÝΪxxx.xxx.xxx.xxxÕâÑùµÄÐÎʽ£¬±íÃæÉÏ¿´ÉÏÃæµÄ´úÂëÓ¦¸ÃÊä³ö"unknown"£¬¶øʵ¼ÊÈ´Êä³öÁË"1.1.1.255haha"£¬ÒòΪeregº¯Êý´æÔÚNULL½Ø¶Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ