当前位置: 首页>>代码示例>>PHP>>正文


PHP UploadHandler::i18n方法代码示例

本文整理汇总了PHP中UploadHandler::i18n方法的典型用法代码示例。如果您正苦于以下问题:PHP UploadHandler::i18n方法的具体用法?PHP UploadHandler::i18n怎么用?PHP UploadHandler::i18n使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UploadHandler的用法示例。


在下文中一共展示了UploadHandler::i18n方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

					$return[] = $file;
				}
			}
		}
		return $return;
	}
}

//	statically set default language vars - an app that needs to customize messages can do so after including this class (only needs to happen once)

UploadHandler::$i18n = array(
	'UPLOADHANDLER_ERR_PROCESS_POST_SIZE'	=> 'POST size of %1$d bytes exceeds the limit set in php.ini#post_max_size of %2$d bytes.',
	'UPLOADHANDLER_ERR_PROCESS_NO_INPUT'	=> 'No file input fields were detected in the POST request.',
	'UPLOADHANDLER_ERR_MOVE_EXISTS'			=> 'Could not move uploaded file "%1$s" to "%2$s" as the destination file already exists and the overwrite option was not set.',
	'UPLOAD_ERR_INI_SIZE'					=> 'The uploaded file exceeds the upload_max_filesize directive in php.ini.',
	'UPLOAD_ERR_FORM_SIZE'					=> 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.',
	'UPLOAD_ERR_PARTIAL'					=> 'The uploaded file was only partially uploaded.',
	'UPLOAD_ERR_NO_FILE'					=> 'No file was uploaded.',
	'UPLOAD_ERR_NO_TMP_DIR'					=> 'Missing a temporary folder.',
	'UPLOAD_ERR_CANT_WRITE'					=> 'Failed to write file to disk.',
	'UPLOAD_ERR_EXTENSION'					=> 'File upload stopped by extension.',
);

//	statically set some values that do not change throughout the lifetime of a request

UploadHandler::$contentLength = (int)@$_SERVER['CONTENT_LENGTH'];
UploadHandler::$maxPostSize = UploadHandler::iniBytes(ini_get('post_max_size'));

// store this for informational purposes only - php upload support will internally deny uploads which are over this size but client-side code can use this to advise of file size limits
UploadHandler::$uploadMaxFilesize = UploadHandler::iniBytes(ini_get('upload_max_filesize'));

// the lowest of both maxPostSize and uploadMaxFile size determines the maximum size of a single file upload (may not be accurate to the byte since there's some POST overhead if max POST size happens to be smaller than max file size)
开发者ID:hungnv0789,项目名称:vhtm,代码行数:32,代码来源:uploadhandler.php


注:本文中的UploadHandler::i18n方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。