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

CentOS 5.2 ÏÂÓÃYum°²×°Apache+PHP+MySQL»·¾³


1.
CentOS 5.2 ÏÂÓÃYum°²×°Apache+PHP+MySQL»·¾³
2009-04-03 23:47
Fedora 8ÏÂÓÃYum°²×°Apache+PHP+MySQL»·¾³
fedora8 ÓÃyumÀ´¹ÜÀí°²×°Apache+PHP+MysqlµÄ»ù±¾°²×°¡£
1. °²×°Apahce, PHP, Mysql, ÒÔ¼°phpÁ¬½Ómysql¿â×é¼þ¡£
yum -y install httpd php mysql mysql-server
php-mysql
centos°²×°php²å¼þ¾ÍÊÇyum install php-*
yum install php-gd °²×°Í¼ÐÎÖ§³Ö
Ò²¿ÉÒÔͨ¹ý¹âÇýiso°²×°
mount /dev/cdrom /mnt¹ÒÔعâÇýµ½mnt
rpm -ivh /mnt/centos/httpd ****.rpm
°²×°ISOÀïµÄ°ü
²âÊÔ»·¾³
rpm -qa |grep mysql
rpm -qa |grep httpd
rpm -qa |grep php
2. ÅäÖÿª»úÆô¶¯·þÎñ
/sbin/chkconfig httpd on            
[ÉèÖÃapache·þÎñÆ÷httpd·þÎñ¿ª»úÆô¶¯]
/sbin/chkconfig --add mysqld        
[ÔÚ·þÎñÇåµ¥ÖÐÌí¼Ómysql·þÎñ]
/sbin/chkconfig mysqld on            
[ÉèÖÃmysql·þÎñ¿ª»úÆô¶¯]
/sbin/service httpd start            
[Æô¶¯httpd·þÎñ,Ó뿪»úÆô¶¯ÎÞ¹Ø]
/sbin/service mysqld start          
[Æô¶¯mysql·þÎñ,Ó뿪»úÎÞ¹Ø]
3.ÉèÖÃmysqlÊý¾Ý¿ârootÕʺÅÃÜÂë¡£
mysqladmin -u root password 'newpassword'          
[ÒýºÅÄÚÌîÃÜÂë]
4. ÈÃmysqlÊý¾Ý¿â¸ü°²È«
mysql -u root -p
mysql> DROP DATABASE
test;                             [ɾ³ýtestÊý¾Ý¿â]
mysql> DELETE from mysql.user WHERE user =
'';         [ɾ³ýÄäÃûÕÊ»§]
mysql> FLUSH
PRIVILEGES;                               [ÖØÔØȨÏÞ]
5. °´ÕÕÒÔÉϵݲװ·½Ê½, ÅäÖóöÀ´µÄĬÈÏÕ¾µãĿ¼Ϊ/var/www/html/
н¨Ò»


Ïà¹ØÎĵµ£º

ÖØȼÄãµÄPHP°²È«Ö®»ð

¶ÔÓڽű¾°²È«Õâ¸ö»°ÌâºÃÏñÓÀԶûÍêûÁË£¬Èç¹ûÄã¾­³£µ½¹úÍâµÄ¸÷ÖÖ¸÷ÑùµÄbugtraqÉÏ£¬Äã»á·¢ÏÖÓÐÒ»°ëÒÔÉ϶¼ºÍ½Å±¾Ïà¹Ø£¬ÖîÈçSQL
injection£¬XSS£¬Path Disclosure£¬Remote commands executionÕâÑùµÄ×ÖÑ۱ȱȽÔÊÇ£¬ÎÒÃÇ¿´ÁËÖ®ºóµÄÓÃ;ÄѵÀ½ö½öÊÇ×¥È⼦?¶ÔÓÚÎÒÃÇÏë×öweb°²È«µÄÈËÀ´Ëµ£¬×îºÃ¾ÍÊÇÄÃÀ´Ñ§Ï°
£¬¿ÉÊÇÍòÎï×¥¸ùÔ´£¬ÎÒà ......

PHPÈÕ³£¿ª·¢Ð¡¼¼ÇÉ

PHPÅúÁ¿È¡µÃcheckboxµÄÖµ
1¡¢ÃüÃû
<input type='checkbox' name='checkbox[]' value=$dwmyrow[banzhu] />
2¡¢Ê¹ÓÃ
µ±¼Æ»®µ±×÷sqlÖ¸ÁîµÄÒ»²¿·Öʱ£ºÈç¹û²ÎÓë¿ØÖƵÄ×Ö¶ÎÊÇÊýÖµÐ͵ģ¬Ôò
if(! empty($_POST['checkbox'])) {
$expr = join(",", $_POST['checkbox']);
$sql = "select * from tbl_name where field in ......

PHPÉÏ´«Îļþ´óСÏÞÖÆ

/*
>>> Author: Áõ³¿êÍ 
>>> Date   : 2009-07-05
>>> EMAIL :
huichengongzi@gmail.com
>>> תÔØÇë×¢Ã÷³ö´¦£¬Ð»Ð»ºÏ×÷£¡
*/
ÅäÖÃphp.iniÎļþ £¨ÒÔÉÏ´«500MÒÔÏ´óСµÄÎļþΪÀý£©
²éÕÒÒÔÏÂÑ¡Ïî²¢ÐÞ¸Ä->
       file_upload ......

php4 xml Éú³ÉÀà

ÓÉÓÚ ÔÚphp4µÄ»·¾³ÏÂ. ¶¼Ã»ÕÒµ½×Ô¶¯Éú³ÉµÄº¯Êý. ËùÒÔ×Ô¼º¸ÄдÁËÒ»¸ö±ðÈËЩµÄÀà. ÓÃÀ´×Ô¶¯Éú³Éxml Îļþ.
<?php
/*
*** ¹¦ÄÜ : php4×Ô動Éú³Éxml Îļþ類
*** @ edit: zxwo0o
*** @ time: 2009-9-22
*/
class php4xml{
var $version; //°æ±¾號
var $start; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ