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

php´¦ÀíÉÏ´«Îļþ

¹«Ë¾MMʱ³£¸øÎÒһЩºÅÂë,È»ÎÒ²éѯÊÇÄļҵÄ,¶¼ÊÇtxtÎı¾¸ñʽµÄ,»¹ºÃºÅÂëÊÇÒ»ÐÐÒ»¸ö,ÓÚÊÇÓÃfile()º¯ÊýÈ¡¸öÊý×é,¿ªÊ¼µÄʱºòÎÒµÄwin7 32λµÄ¿ÉÒÔÓÃapacheºóÀ´×°64λwin7ÓÉÓÚûÕÒµ½Ô­ÉúµÄ64λapacheÓÚÊǾʹ«µ½·þÎñÆ÷ÉÏÿ´Î,ÓÐÉÏ´«ÓиÃÎļþºÜÂé·³,ÓÚÊÇ×ö³ÉÒ»¸öÒ³ÃæÈ¥ÈÃMM×Ô¼ºÍê³É.·Ï»°²»¶à˵ ÒªÔÚform±íµ¥ÀïÉÏ´«Îļþ¾ÍµÃÐèÒªÔÚ±íµ¥ÐÅÏ¢Àï¼ÓÉÏenctypeÐÅÏ¢:enctype="multipart/form-data" »¹ÓÐfile¸ñʽµÄ±íµ¥ÔªËØ ÔÚphp.iniÓм¸¸öºÍÉÏ´«ÎļþÏà¹ØµÄÉèÖþõµÃÓбØÒª½²Ï upload_tmp_dir //ÁÙʱ´æ·ÅÉÏ´«ÎļþµÄĿ¼,ĬÈÏΪ¿Õ upload_max_filesize //ÉÏ´«Îļþ×î´ó³ß´ç ĬÈÏΪ2M file_uploads //ÊÇ·ñÔÊÐíÉÏ´«Îļþ,ĬÈÏΪOn max_input_time //Ò»¸öPOSTÇëÇóµÄÖ´ÐеÄ×î´óʱ¼ä,µ¥Î»ÎªÃë,ĬÈÏ60 post_max_size //Ò»¸öPOSTÇëÇó×î´óµÄÊý¾ÝÁ¿,Õâ¸öÊýÖµ±ØÐë´óÓÚupload_max_filesize ĬÈÏΪ8M ÓÃ$_FILES['data']½ÓÊÜÎļþ¼°ÐÅÏ¢ÆäÖÐ ['name'] => ÎļþÃû,ÔÚ¿Í»§¶ËµÄÎļþÃû ['type'] => ÎļþMIMEÀàÐÍ¡£Èçimage/jpeg, text/plain, application/octet-streamµÈ¡£ ['tmp_name'] => Èç¹ûÎļþСÓÚÔÊÐíÉÏ´«Îļþ´óС£¬Ôò¸ÃλÖñíʾÉÏ´«µÄÎļþÁÙʱ´æ·Å·¾¶¼°ÁÙʱÎļþÃû£¬±»·ÅÔÚupload_tmp_dirËùÖ¸¶¨µÄλÖᣠ['size'] => Îļþ´óС ['error'] => ´íÎó´úÂë ÆäÖÐerror´íÎó´úÂë¿ÉÄܵÄÖµÈçÏÂ±í£º 0 UPLOAD_ERR_OK Îļþ³É¹¦ÉÏ´« 1 UPLOAD_ERR_INI_SIZE Îļþ´óС±Èphp.iniÖÐupload_max_filesizeÖ¸¶¨ÖµÒª´ó 2 UPLOAD_ERR_FORM_SIZE ÎļþµÄ С±È±íµ¥µÄMAX_FILE_SIZEÖ¸¶¨µÄÖµ´ó 3 UPLOAD_ERR_PARTIAL ÎļþÉÏ´«²»ÍêÕû£¨¿ÉÄÜÒòΪÇëÇóʱ¼ä¹ý³¤±»ÖÕÖ¹£© 4 UPLOAD_ERR_NO_FILE ûÓÐÎļþËæ×ÅÕâ¸öÇëÇóÉÏ´« 6 UPLOAD_ERR_NO_TMP_DIR  ÔÚphp.iniÖÐûÓÐÖ¸¶¨ÁÙʱÎļþ¼Ð Ö»Óе±$_FILES['filename']['error']µÄֵΪ0ʱ£¬²ÅÓ¦¸Ã¼ÌÐø´¦ÀíÎļþ¡£ °²È«ÐÔ¿¼ÂÇ,Ó¦¸ÃʹÓÃmove_upload_fileº¯ÊýÀ´Íê³ÉÒƶ¯ÉÏ´«ÎļþµÄ²Ù×÷,×îºÃÓÃ$_FILES['data']['type']À´ÅжÏÎļþÀàÐÍ. ¹ØÓÚis_uploade_file()º¯Êý,ÎÒûÊÔ¹ý,ÓÐÍøÓÑÑо¿¹ý,ÕªÀ´ÈçÏÂ:   is_uploaded_file()µÄ·µ»ØÖµ     ÊÖ²áÉÏÃæ²»ºÜÏêϸµØ˵£¬Ó÷¨ÊÇ£º
        bool is_uploaded_file( string filename)
    ʵ¼ÊÉÏ
        is_uploaded_file($_FILES['userfile']['name']);
  &#


Ïà¹ØÎĵµ£º

php½â¾öcheckboxÎÊÌâ

<script language="javascript" type="text/javascript">
function checkbox()
{
var str=document.getElementsByName("chk");
var objarray=str.length;
var chestr="";
for (i=0;i<objarray;i++)
{
if(str[i].checked == true)
{
chestr+="1";
} else{
chestr+="0";
}
}
document.ge ......

php JSON


JSON ÊÇÒ»ÏîÖ¼ÔÚÔÊÐíÖмä¼þ´´½¨Ê¹Óà JavaScript ¹ÌÓиñʽµÄ¶ÔÏóµÄЭÒé¡£Ëü×îÇ¿´óµÄÊôÐÔÊÇËüÊÇÒ»ÖÖÇáÁ¿¼¶Ð­Òé¡£¼òµ¥´¦Àí RSS ¾ÛºÏ»ò recipe Áбíʱ£¬Äú²»ÐèÒªÔÚ JavaScript ÖÐʹÓà XML µÄÈ«²¿¹¦ÄÜ¡£²»ÐèÒªÑéÖ¤¸ñʽ»òÈ·±£ÑϸñµÄÊý¾Ý¼üÈë¡£
±àÂëºÍ½âÂë
ÓÐÁ½¸öº¯ÊýÓÃÓÚ JSON£ºencode ºÍ decode¡£µÚÒ»¸öº¯Êý½«°ÑÈÎÒâÀàÐ͵ÄÊý ......

php ÖÐÉú³ÉËæ»ú×Ö·û´®µÄ·½·¨

php ÖÐÉú³ÉËæ»ú×Ö·û´®µÄ·½·¨
2009-10-20 13:56
ÔÚһЩÌØÊâÓ¦ÓÃÖУ¬ÐèÒªÉú³ÉËæ»ú×Ö·û´®£¬±ÈÈçÉú³ÉϵͳËæ»úÃÜÂë»òÕßÊǵǽÑéÖ¤ÂëµÈ£¬±¾ÎĽéÉܵĺ¯ÊýÄܹ»·µ»ØÖ¸¶¨³¤¶ÈµÄËæ»ú×Ö·û´®£¬Ä¬ÈÏ°üº¬´óСд×ÖĸºÍÊý×Ö£¬Äã¿ÉÒÔºÜÈÝÒ×µÄÐÞ¸ÄÒÔ±ã·ûºÏ×Ô¼ºµÄÐèÒª¡£
<?php
// ˵Ã÷£ºphp ÖÐÉú³ÉËæ»ú×Ö·û´®µÄ·½·¨
// ÕûÀí£ºhttp://ww ......

PHP

ÎÒÊÇѧµç×ÓÉÌÎñµÄѧÉú£¬Ö÷Ҫѧϰ·½ÏòÊǵç×ÓÉÌÎñ¼¼Êõ²ãÃæµÄ¶«Î÷¡£Ñ§ÁËÒ»Äê¶àµÄʱ¼äÁË£¬¸Ð¾õСÓÐÊÕ»ñ¡£
Ç°¶Îʱ¼ä³öÈ¥ÃæÊÔflashµÄʱºò·¢ÏÖ×Ô¼ººÍ±ðÈ˵ÄÒªÇó²î¾àÉõÔ¶£¬»Øµ½Ñ§Ð£ºóŬÁ¦µÄѧϰPHP£¬×ÔÎҸоõ»¹²»´í£¬È«°àֻʣϼ¸¸öÈËÔÚѧºǫ́ÓïÑÔÁË£¬²»ÖªµÀÊÇÒòΪÓÐÁËÉÏÒ»´ÎµÄ´ò»÷»¹ÊÇÒòΪÎÒÊʺÏѧPHP£¬×ÔÈÏΪѧµÃ±È½Ï¿ì£¬ÖÁÉÙ±ÈÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ