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

·À·¶phpľÂí

1¡¢·ÀÖ¹Ìø³öwebĿ¼ £¨ÑÏÖزÉÓã©
¡¡¡¡Ê×ÏÈÐÞ¸Ähttpd.conf£¬Èç¹ûÄãÖ»ÔÊÐíÄãµÄphp½Å±¾³ÌÐòÔÚwebĿ¼Àï²Ù×÷£¬»¹¿ÉÒÔÐÞ¸Ähttpd.confÎļþÏÞÖÆphpµÄ²Ù×÷·¾¶¡£±ÈÈçÄãµÄwebĿ¼ÊÇ/usr/local/apache/htdocs£¬ÄÇôÔÚhttpd.confÀï¼ÓÉÏÕâô¼¸ÐУº
¡¡¡¡php_admin_value open_basedir /usr/local/apache/htdocs
¡¡¡¡ÕâÑù£¬Èç¹û½Å±¾Òª¶ÁÈ¡/usr/local/apache/htdocsÒÔÍâµÄÎļþ½«²»»á±»ÔÊÐí£¬Èç¹û´íÎóÏÔʾ´ò¿ªµÄ»°»áÌáʾÕâÑùµÄ´íÎó£º
¡¡¡¡Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/apache/htdocs/open.php on line 4 µÈµÈ¡£
Èç¹ûÓжà¸ö»ùÓÚÓòÃûµÄÐéÄâÖ÷»ú
<VirtualHost *>
ServerName     www.test1.com
DocumentRoot /usr/local/apache/htdocs/test1
<Directory /usr/local/apache/htdocs/test1>
     php_admin_value open_basedir     /usr/local/apache/htdocs/test1
</Directory>
</VirtualHost>
×¢Òâ:ÔÚphp_admin_value open_basedir±ðÍüÁ˼ÓÉÏphp.iniÖÐÖ¸¶¨µÄPHPÁÙʱÉÏ´«Ä¿Â¼ºÍsession±£´æĿ¼£¬²»È»»áÎÞ·¨ÉÏ´«Îļþ¡¢´æÈ¡session
php.iniÖа´ÈçÏÂÅäÖãº
upload_tmp_dir = "/tmp"
session.save_path = "/var/phpsession"
¡¡¡¡2¡¢·ÀÖ¹phpľÂíÖ´ÐÐwebshell £¨ÑÏÖزÉÓã©
¡¡¡¡´ò¿ªsafe_mode£¬
¡¡¡¡ÔÚ£¬php.iniÖÐÉèÖÃ
¡¡¡¡disable_functions= passthru£¬exec£¬shell_exec£¬system
¡¡¡¡¶þÕßÑ¡Ò»¼´¿É£¬Ò²¿É¶¼Ñ¡
¡¡¡¡3¡¢·ÀÖ¹phpľÂí¶ÁдÎļþĿ¼ £¨ºÃÏñûÓÐÒªÇóÕâôÑϸñ,²»ÍƼö²ÉÓᣣ©
¡¡¡¡ÔÚphp.iniÖеÄ
¡¡¡¡disable_functions= passthru£¬exec£¬shell_exec£¬system
¡¡¡¡ºóÃæ¼ÓÉÏphp´¦ÀíÎļþµÄº¯Êý
¡¡¡¡Ö÷ÒªÓÐ
¡¡¡¡fopen£¬mkdir£¬rmdir£¬chmod£¬unlink£¬dir
¡¡¡¡fopen£¬fread£¬fclose£¬fwrite£¬file_exists
¡¡¡¡closedir£¬is_dir£¬readdir.opendir
¡¡¡¡fileperms.copy£¬unlink£¬delfile
¡¡¡¡¼´³ÉΪ
¡¡¡¡disable_functions= passthru£¬exec£¬shell_exec£¬system£¬fopen£¬mkdir£¬rmdir£¬chmod£¬unlink£¬dir
¡¡¡¡£¬fopen£¬fread£¬fclose£¬fwrite£¬file_exists
¡¡¡¡£¬closedir£¬is_dir£¬readdir.opendir
¡¡¡¡£¬fileperms.copy£¬unlink£¬delfile
¡¡¡¡ok£¬´ó¹¦¸æ³É£¬phpľÂíÄÃÎÒÃÇûÕÞÁË.


Ïà¹ØÎĵµ£º

£Ûת£ÝPHP·ÖÒ³ÏÔʾÖÆ×÷Ïêϸ½²½â


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

PHP+DOM´´½¨XMLÎļþ

´´½¨ÎĵµÀàÐÍÉùÃ÷
Ò»°ã¶øÑÔ£¬XMLÉùÃ÷·ÅÔÚÎĵµ¶¥²¿¡£ÔÚPHPÖÐÉùÃ÷Ê®·Ö¼òµ¥£ºÖ»ÐèʵÀý»¯Ò»¸öDOMÎĵµÀàµÄ¶ÔÏ󲢸³ÓèËüÒ»¸ö°æ±¾ºÅ¡£²é¿´³ÌÐòÇåµ¥A£º
³ÌÐòÇåµ¥ A
<?php
// create doctype
$dom = new DOMDocument("1.0");
// display document in browser as plain text
// display document in browser as plain text ......

ѸËÙѧ»áPHP¼ÓÃܽâÃܼ¼ÇÉ

Ïл°ÉÙ˵,ÏȽ«ËüÃÇ´ò°ü³ÉÒ»¸öÎļþ¾Í½Ðfun.php°É
< ?php  
function passport_encrypt($txt, $key) {  
srand((double)microtime() * 1000000);  
$encrypt_key = md5(rand(0, 32000));  
$ctr = 0;  
$tmp = ''; ......

PHP³ÌÐòºÍMySqlÊý¾ÝÂÒÂëÎÊÌâÔ­Òò¼°½â¾ö

PHP³ÌÐòºÍMySqlÊý¾ÝÂÒÂëÎÊÌâÔ­Òò¼°½â¾ö
ÂÒÂëÎÊÌâ¼òµ¥Ëµ¾ÍÊÇÊý¾Ý¿âдÈë¶ÁÈ¡£¬ÍøÒ³Îļþ£¬ÍøÒ³ÏÔʾʱ¼¸¸ö»·½ÚµÄ±àÂë²»Ò»ÖÂÔì³ÉµÄ¡£
ÂÒÂëÎÊÌâ
дÈëʱ£ºÒ³ÃæÌáȡдÈëÊý¾Ý±àÂëºÍдÈëÊý¾Ý¿âʱ±àÂë²»Ò»ÖÂ
¶Áȡʱ£º¶ÁÈ¡ºóËùÓñàÂëÓëÊý¾Ý¿âдÈëʱ²»Ò»ÖÂ
ÏÔʾʱ£º±àÂëÓëÊý¾Ý¿â¶ÁÈ¡ºóµÄÊý¾Ý²»Ò»ÖÂ
ºÜÏÔȻֻÓÐÈýÕ߶¼Í³Ò»²ÅÐУ ......

phpÏÂÄÄÖÖ·½·¨ºÏÊʽâÎöxml£¬×ª»»³Éjson¸ñʽ

½âÎöxmlÎĵµµÄÀà¿âÓкܶàÖÖ£¬±È½Ï³£ÓõľÍÊÇSimpleXML£¬DOM Document£¬XMLReader£¬»ùÓÚSAXµÄxml_parseº¯Êý¡£
¸ù¾ÝxmlÎĵµ½á¹¹£¬ÒÔ¼°ÐèÇóµÄ²»Í¬£¬ÒªÑ¡ÔñºÃ¶ÔÓ¦µÄÀà¿â¡£
½âÎöСµÄÎĵµµÄ»°£¬Ê¹ÓÃSimpleXML±È½ÏºÏÊÊ£¬¼òµ¥µÄ¼¸¸öº¯Êý¾Í¿ÉÒԸ㶨¡£
Èç¹ûÎĵµ·Ç³£¾Þ´ó£¬×îºÃÊÇXMLReader´ò¿ª£¬Öмäת»»³ÉDOMÀ´½âÎö£¬¸Ð¾õDOMÓëXPat ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ