Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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µÄÊý¾ÝÀàÐͺÍÊý×éÏê½â


 PHPÊÇÈõÀàÐÍÓïÑÔ¡£
»ù±¾Êý¾ÝÀàÐÍ£ºinteger¡¢string¡¢boolean¡¢float
¸´ºÏÊý¾ÝÀàÐÍ£ºarray¡¢object
»ù±¾Êý¾ÝÀàÐ;Ͳ»ËµÁË£¬ÏÂÃæ¿´Ò»¸öÊý×éÏà¹ØµÄһЩÀý×Ó¡£
$test1=array(1,2,3,4);//¶¨ÒåÁËÒ»¸ö°üº¬4¸öÊýµÄÊý×é
$test1=array("new1"=>1,"new2"=>2);//Á½¸ö±äÁ¿µÄÊý×é,array['new1']=1,array['new2']=2
¶ ......

phpÖ®XMLתÊý×麯Êý

<?
/**
* xml2array() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
* Arguments : $contents - The XML text
* $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the ......

php mail class with readme

ʹÓ÷½·¨£º
<?
Include “email.class”
$mail->setTo("a@a.com"); //ÊÕ¼þÈË
$mail-> setCC£¨"b@b.com,c@c.com"£©; //³­ËÍ
$mail-> setCC£¨"d@b.com,e@c.com"£©; //ÃØÃܳ­ËÍ
$mail->setfrom(“f@f.com”);//·¢¼þÈË
$mail->setSubject(“Ö÷Ìâ”) ; //Ö÷Ìâ
$ ......

PHPÃæÊÔ 2

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