upload_file_by_file($bucket,$object,$file_path); } } else { if($file!='.'&&$file!='..') { syn_path($service,$bucket,$path.$file."/"); } } } closedir( $dir ); } } if($GLOBALS['distribution_cfg']['OSS_TYPE']=="ALI_OSS") { require_once APP_ROOT_PATH."system/alioss/sdk.class.php"; $oss_sdk_service = new ALIOSS(); //设置是否打开curl调试模式 $oss_sdk_service->set_debug_mode(true); $bucket = $GLOBALS['distribution_cfg']['OSS_BUCKET_NAME']; foreach($GLOBALS['paths'] as $path) { syn_path($oss_sdk_service,$bucket,APP_ROOT_PATH.$path); } } ?>