ʵÏÖwordpressÉÏ´«Îļþ×Ô¶¯ÖØÃüÃû
wordpress¶ÔÓÚÉÏ´«µÄÎļþĬÈϲ»¸Ä±äÎļþµÄÔÃû³Æ£¬Óв©Ö÷¿ÉÄÜÓÉÓÚÎļþÁ¿´ó¶ø²»Ô¸ÒâÖð¸öÖØÃüÃûÎļþ£¬Èç¹ûÖ±½ÓÉÏ´«µÄ»°£¬¿ÉÄܻᵼÖÂÖÐÎÄÎļþÃûµÄÎļþ³öÏÖÂÒÂë»òÆäËüÎÊÌ⣬Èç¹û¸½¼þ±£´æÔÚͬһ¸öĿ¼£¬Ò²¿ÉÄܵ¼ÖÂÎļþÃûÖظ´¶ø±»¸²¸Ç¡£Ö®Ç°Ê¹ÓÃzblog¡¢dedecmsµÈ³ÌÐòʱ£¬ÏµÍ³¶¼»á¶ÔÉÏ´«µÄÎļþ×Ô¶¯ÖØÃüÃû£¬ËÑË÷·¢ÏÖ¿ÉÒÔͨ¹ýÐÞ¸ÄwordpressÔ´´úÂëʵÏÖÎļþ×Ô¶¯ÖØÃüÃû¡£
²Ù×÷·½·¨£º
ÔÚwordpress³ÌÐòµÄwp-admin/includes/Ŀ¼ÖÐÕÒµ½file.phpÎļþ£¬²¢½øÐб༣¬ÔÚ327ÐÐ×óÓÒÕÒµ½ÒÔÏ´úÂ룺
// Move the file to the uploads dir
$new_file = $uploads['path'] . "/$filename";
if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) )
return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) );
½«ÆäÌ滻Ϊ
// Move the file to the uploads dir
$new_file = $uploads['path'] . "/".date("YmdHis").floor(microtime()*1000).".".$ext;
if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) )
return $upload_error_handler( $file, sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'] ) );
PS£ºÕûÌå´úÂëÆäʵ¾ÍÊÇÌæ»»µôÁË"/$filename";
±£´æºó¸²¸ÇÔÎļþ£¬ÄÇôÉÏ´«Îļþ¾Í»áÒÔ“ÄêÔÂÈÕʱ·ÖÃë+ǧλºÁÃëÕûÊý”µÄ¸ñʽÖØÃüÃûÎļþÁË£¬Èç“20121023122221765.jpg”¡£
ÎÄÕÂÀ´Ô´£º²©¿Í°É£¬×ªÔØÇë×¢Ã÷³ö´¦¡£
×¢£ºÏà¹ØÍøÕ¾½¨Éè¼¼ÇÉÔĶÁÇëÒƲ½µ½½¨Õ¾½Ì³ÌƵµÀ¡£
ÍƼöÐÅÏ¢
- ¹¹½¨¸ß¿ÉÓú͵¯ÐÔÉìËõµÄKV´æ´¢ÏµÍ³
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨¶þ£©
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨Ò»£©
- Ðì¹úÏ飺΢²©ÊÇ·ñ»á²ÎÓëÍøÕ¾ÅÅÃû
- ApacheÔÚ±¾µØ½¨Á¢·ºÓòÃûÐéÄâÖ÷»ú¼ò·¨
- ÈçºÎ½øÐÐÍøÕ¾Õï¶Ï ΪÍøÕ¾½øÐÐÆÀ·Ö
- Ò»¸ö³É¹¦µÄÕ¾³¤Ó¦¸Ã¾ß±¸µÄËØÖÊ
- Ò»Ìõ΢²©Òý·¢µÄ·ÖÎö£ºÈçºÎÈÃ΢²©µÃµ½¹ã·º´«²¥
- ÈçºÎÈÃÒ»¸öÍøÕ¾ÓÐÇ¿´óÉúÃüÁ¦
- פ×ãIDCÃż÷³Ö±Ò¹ÛÍû Õ¾³¤Ñ¡¹º¿Õ¼ä³É¡°¼èÄѵľö¶¨¡±£¿
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
ÆÀÂÛ