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

Ê®Ììѧ»áphpÖ®µÚÊ®Ìì

 Ñ§Ï°Ä¿µÄ£ºÑ§»áÓÃPHPÉÏ´«ÎļþºÍ·¢Óʼþ
¡¡¡¡ÉÏ´«Îļþ±íµ¥±ØÐë¼ÓÉÏ enctype="multipart/form-data" ºÍ <input type="file" name="file">
¡¡¡¡
¡¡¡¡ÏÂÃ濴һϴúÂ룺
¡¡¡¡$f=&$HTTP_POST_FILES['file'];
¡¡¡¡$dest_dir='uploads';//É趨ÉÏ´«Ä¿Â¼
¡¡¡¡$dest=$dest_dir.'/'.date("ymd")."_".$f['name'];//ÎÒÕâÀïÉèÖÃÎļþÃûΪÈÕÆÚ¼ÓÉÏÎļþÃû±ÜÃâÖظ´
¡¡¡¡$r=move_uploaded_file($f['tmp_name'],$dest);
¡¡¡¡chmod($dest, 0755);//É趨ÉÏ´«µÄÎļþµÄÊôÐÔ
¡¡¡¡ÉÏ´«µÄÎļþÃûΪdate("ymd")."_".$f['name'] £¬¿ÉÒÔÔÚÒÔºó²åÈëµ½Êý¾Ý¿âµÄʱºòÓõ½£¬PHPʵ¼ÊÉÏÊÇ°ÑÄãÉÏ´«µÄÎļþ´ÓÁÙʱĿ¼Òƶ¯µ½Ö¸¶¨Ä¿Â¼¡£move_uploaded_file($f['tmp_name'],$dest);ÕâÊǹؼü
¡¡¡¡ÖÁÓÚ·¢Óʼþ¾Í¸ü¼Ó¼òµ¥£¬¿ÉÒÔʹÓÃmail()º¯Êýmail("ÊÕ¼þÈ˵ØÖ·","Ö÷Ìâ","ÕýÎÄ","from:·¢¼þÈË\r\nReply-to:·¢¼þÈ˵ĵØÖ·");
¡¡¡¡²»¹ýmail()ÐèÒª·þÎñÆ÷µÄÖ§³Ö£¬ÔÚWINDOWSÏ»¹ÐèÒªÅäÖÃSMTP·þÎñÆ÷£¬Ò»°ãÀ´ËµÍâÃæµÄLINUX¿Õ¼ä¶¼ÐС£
¡¡¡¡
¡¡¡¡ºÃÏñÉÏ´«ÎļþºÍ·¢Óʼþ±ÈASP¼òµ¥ºÜ¶à£¬Ö»Òªµ÷Óú¯Êý¾Í¿ÉÒÔÁË¡£ASP»¹ÐèÒªÓõ½·þÎñÆ÷µÄ²»Í¬×é¼þ±ÈÈçFSO¡¢JMAILʲôµÄ¡£
¡¡¡¡Ê®Ììѧ»áPHP˵µ½ÕâÀïÁË£¬ÎÒµÄÈý´óϵÁÐÎÄÕ¶¼Óá¶Ê®Ììѧ»á¡·×÷ΪÃû×Ö£¬Ïë¸æËß´ó¼ÒµÄÊÇASP,PHP,ASP.NETÈëÃŶ¼¿ÉÒÔÊÇÊ®Ì죬µ«ÊǾ«Í¨¾ö²»ÊÇÊ®Ìì°¡£¬»¹ÐèÒª´ó¼Ò×Ô¼ºÈ¥Ñо¿¡£


Ïà¹ØÎĵµ£º

php×Ö·û´®º¯ÊýÓ¦Ó×—¾­µä

  PHP: echo substr("1234567", 1, 3);
ºÍ PHP: echo substr(123456,1, 3);
ÊÇÒ»ÑùµÄ
¶¨Òå
Ò»°ãÓÃË«ÒýºÅ»òµ¥ÒýºÅ±êʶһ¸ö×Ö·û´®¡£±ÈÈç PHP: $str = "i love u";
$str = 'i love u';
ËüÕßÁ½ÕßÊÇÓÐһЩÇø±ðµÄ¡£ºóÕß½«Ò»Çе¥ÒýºÅµÄÄÚÈݶ¼»áµ±×÷×Ö·û´¦Àí£»Ç°ÕßÔ ......

PHP³Á˼¼֮¹¤×÷Ä£ÐÍ

PHP³Á˼¼
¡¡¡¡¹¤×÷Ä£ÐÍ
¡¡¡¡PHPµÄ¹¤×÷Ä£Ðͷdz£ÌØÊâ¡£´ÓijÖ̶ֳÈÉÏ˵£¬PHPºÍASP¡¢ASP.NET¡¢JSP/ServletµÈÁ÷ÐеÄWeb¼¼Êõ£¬ÓÐ×ű¾ÖÊÉϵÄÇø±ð¡£
¡¡¡¡ÒÔJavaΪÀý£¬JavaÔÚWebÓ¦ÓÃÁìÓò£¬ÓÐÁ½ÖÖ¼¼Êõ£ºJava ServletºÍJSP£¨Java Server Page£©¡£Java ServletÊÇÒ»ÖÖÌØÊâÀàÐ͵ÄJava³ÌÐò£¬Ëüͨ¹ýʵÏÖÏà¹Ø½Ó¿Ú£¬´¦ÀíWeb·þÎñÆ÷·¢Ë͹ ......

WindowsÏÂPHP¿ªÆômcryptÀ©Õ¹ºÍSSL(OpenSSL£©À©Õ¹Ö§³Ö

½ñÌìÏëʹÓÃÒ»ÏÂPHPµÄOpenSSLÀ©Õ¹¿â£¬Ï°¹ßÐԵĴÓphp.iniÖÐÏàÓ¦Ðдò¿ªÖ§³Ö£¬È»ºóË¢ÐÂÒ³Ã棬·¢ÏÖ¾¹È»»¹ÊDz»Ö§³Ö£¿
ÓôÃÆ֮ϣ¬¿´ÁË¿´ApacheµÄ´íÎóÈÕÖ¾£ºÌáʾ“²»ÄܼÓÔØXXX¶¯Ì¬¿â"£¿
ÕæÊǼû¹í£¬±ðµÄÁ´½Ó¿â¶¼¿ÉÒÔ×°È룬Ϊʲôphp_mcrypt.dllºÍphp_openssl.dllÕâÁ½¸öÁ´½Ó¿âÎÞ·¨×°ÈëÄØ£¿
ÉÏÍø²éÁËÒ»ÏÂ×ÊÁÏ£¬Ô­À´ÕâÁ½¸ö ......

php α¾²Ì¬ url ÖØд

ÕûÁË°ëÌì¿ÉËãÈÃÎÒÕû³öÀ´ÁË º¹°¡£¡
C:\xampp\apache\conf\http.conf ÅäÖÃ
<Directory />
    Options FollowSymLinks
    AllowOverride all
    Order deny,allow
#    Deny from all
</Directory>
н¨ÏîÄ¿myphp
ÐéÄâ»ú·¾¶ localhost ......

Ê®Ììѧ»áphpÖ®µÚÆßÌì

ѧϰĿµÄ£ºÑ§»áSESSIONµÄʹÓÃ
¡¡¡¡SESSIONµÄ×÷Óúܶ࣬×î¶àÓõľÍÊÇÕ¾µãÄÚÒ³Ãæ¼ä±äÁ¿´«µÝ¡£ÔÚÒ³Ã濪ʼÎÒÃÇÒªsession_start();¿ªÆôSESSION£»
¡¡¡¡
¡¡¡¡È»ºó¾Í¿ÉÒÔʹÓÃSESSION±äÁ¿ÁË£¬±ÈÈç˵Ҫ¸³Öµ¾ÍÊÇ£º$_SESSION['item']="item1";ÒªµÃµ½Öµ¾ÍÊÇ$item1=$_SESSION['item'];£¬ºÜ¼òµ¥°É¡£ÕâÀïÎÒÃÇ¿ÉÄÜ»áʹÓõ½Ò»Ð©º¯Êý£¬±ÈÈçË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ