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

php Ŀ¼ºÍÎļþ²Ù×÷

<?php
//н¨Ä¿Â¼
mkdir("/path/to/my/dir", 0700); //0700±íʾȨÏÞ×î´ó
//ɾ³ýĿ¼
rmdir("/path/to/my/dir");
//±éÀúĿ¼
$p =dir(/etc/php5);
echo "handler:".$p->handler;
while(false!=$entry=$p->read()){
    echo $entry."\n" ;
}
$p->close();
//Êä³öÎļþÄÚÈÝ
$handle=@fopen("/tmp/file.txt","r");  //fopenÒ²¿ÉÒÔ´ò¿ªÒ»¸öurl
if($handle){
   while(!feof($handler)){
       echo fgets($handler,4096);
   }
}
//¶þ½øÖÆÐÎʽ´ò¿ª
$filename="/tmp/file.txt";
$handle=@fopen($filename,"b");?>
if($handler){
    $content=fread($handler,filesize($filename));
    fclose($handler);
    echo $content;
}
//»ñµÃurlÄÚÈÝ
$html=file_get_contents(http://www.baidu.com);
echo $html;


Ïà¹ØÎĵµ£º

PHP dataº¯ÊýµÄ³£ÓòÎÊý

a - СдµÄam»òpm
A - ´óдµÄAM»òPM
d - ÈÕ£¬Á½Î»Êý×Ö£¬²»×ãÁ½Î»ÔòÇ°µ¼×Ô¶¯²¹Áã
D - ±íʾÐÇÆÚµÄÓ¢ÎĵÄÇ°Èý¸öÓ¢ÎÄ×Öĸ
F - Ô·ݵÄÓ¢ÎÄÈ«Ãû
h - 12СʱÖÆ£¬Á½Î»Êý×Ö£¬²»×ãÁ½Î»ÔòÇ°µ¼×Ô¶¯²¹Áã
H - 24СʱÖÆ£¬Á½Î»Êý×Ö£¬²»×ãÁ½Î»ÔòÇ°µ¼×Ô¶¯²¹Áã
g - 12СʱÖÆ£¬²»×ãÁ½Î»µÄСʱ²»²¹Áã
G - 24СʱÖÆ£¬²»×ãÁ½Î»µÄСʱ²»²¹Áã ......

PHPµÄ±àдSQLÓï¾äʱ¶ÔÐèҪתÒå×Ö·ûµÄ´¦Àí

1. ¶ÔÓÚPHP magic_quotes_gpc=onµÄÇé¿ö£¬ ÎÒÃÇ¿ÉÒÔ²»¶ÔÊäÈëºÍÊä³öÊý¾Ý¿âµÄ×Ö·û´®Êý¾Ý×÷
addslashes()ºÍstripslashes()µÄ²Ù×÷,Êý¾ÝÒ²»áÕý³£ÏÔʾ¡£ Èç¹û´ËʱÄã¶ÔÊäÈëµÄÊý¾Ý×÷ÁËaddslashes()´¦Àí£¬
ÄÇôÔÚÊä³öµÄʱºò¾Í±ØÐëʹÓÃstripslashes()È¥µô¶àÓàµÄ·´Ð±¸Ü¡£ 2. ¶ÔÓÚPHP magic_quotes_gpc=off µÄÇé¿ö ±ØÐëÊ¹Ó ......

php·ÃÎʳÉÔ±±äÁ¿ºÍ³ÉÔ±·½·¨

php½Ì³Ì:·ÃÎÊPHPÀàÖгÉÔ±±äÁ¿»ò·½·¨
ÔÚ·ÃÎÊPHPÀàÖеijÉÔ±±äÁ¿»ò·½·¨Ê±£¬Èç¹û±»ÒýÓõıäÁ¿»òÕß·½·¨±»ÉùÃ÷³Éconst»òÕßstatic,ÄÇô¾Í±ØÐëʹÓòÙ×÷·û::,
·´Ö®Èç¹û±»ÒýÓõıäÁ¿»òÕß·½·¨Ã»Óб»ÉùÃ÷³Éconst»òÕßstatic,ÄÇô¾Í±ØÐëʹÓòÙ×÷·û->¡£
ÁíÍ⣬Èç¹û´ÓÀàµÄÄÚ²¿·ÃÎÊconst»òÕßstatic±äÁ¿»òÕß·½·¨,ÄÇô¾Í±ØÐëʹÓÃ×ÔÒýÓõ ......

PHPÃæÊÔ 2

»ù´¡Ìâ:
1.±íµ¥ÖÐ getÓëpostÌá½»·½·¨µÄÇø±ð?
´ð:getÊÇ·¢ËÍÇëÇóHTTPЭÒéͨ¹ýurl²ÎÊý´«µÝ½øÐнÓÊÕ,¶øpostÊÇʵÌåÊý¾Ý,¿ÉÒÔͨ¹ý±íµ¥Ìá½»´óÁ¿ÐÅÏ¢.
2.sessionÓëcookieµÄÇø±ð?
´ð:session:´¢´æÓû§·ÃÎʵÄÈ«¾ÖΨһ±äÁ¿,´æ´¢ÔÚ·þÎñÆ÷ÉϵÄphpÖ¸¶¨µÄĿ¼Öеģ¨session_dir£©µÄλÖýøÐеĴæ·Å
   cookie:ÓÃÀ´´æ´¢Á¬Ðø&# ......

ѧÁËNÄêPHPÖ®ºó,ѧ»áPHPµ÷ÊÔ

PHPµ÷ÊÔ»·¾³·Ç³£Âé·³,¶øÇÒÖÖÀàÆä¶à.ÍøÉϵÄÏà¹ØÎÄÕÂÌ«¶àÁË,µ«ÓÉÓÚʱЧµÄÎÊÌâ,²¢²»ÄÜÓÃ.
½ñÌìÕÒµ½Ò»ÆªÎÄÕÂ,ÓÚ2009Äê12ÔÂ17ÈÕ²âÊÔ¿ÉÓÃ.µ«Ê¹ÓÃPDT֮ǰ,Ðè×°JDK,¿Éµ½http://www.skycn.com/soft/3116.htmlÏÂÔØ
ÎÄÕµØÖ·:http://blog.csdn.net/yuhui_fish/archive/2009/03/29/4033397.aspx
ÄÚÈÝÈçÏÂ:
×î½üÔÚÓÃphp£¬ÅäÖúÜÂé·³£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ