
什么是PHP Worker及应该如何使用
wp_handle_upload ( $file, $overrides = false, $time = null )
wp_handle_upload: 这个函数用来处理文件的上传。它接收一个上传文件数据的数组作为参数,并返回附件ID。
_wp_handle_upload()的封装器。
传递{@see ‘wp_handle_upload’}动作。
function wp_handle_upload( &$file, $overrides = false, $time = null ) { /* * $_POST['action'] must be set and its value must equal $overrides['action'] * or this: */ $action = 'wp_handle_upload'; if ( isset( $overrides['action'] ) ) { $action = $overrides['action']; } return _wp_handle_upload( $file, $overrides, $time, $action ); }