本文整理匯總了PHP中upload_manager::get_filesize方法的典型用法代碼示例。如果您正苦於以下問題:PHP upload_manager::get_filesize方法的具體用法?PHP upload_manager::get_filesize怎麽用?PHP upload_manager::get_filesize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類upload_manager
的用法示例。
在下文中一共展示了upload_manager::get_filesize方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: StdClass
$reldir = "files/" . $upload_folder . "/" . $ul_username . "/";
$dir = $CFG->dataroot . $reldir;
if ($um->process_file_uploads($dir)) {
$f = new StdClass();
$f->owner = $USER->ident;
$f->files_owner = $page_owner;
$f->folder = $folderid;
$f->originalname = $um->get_original_filename();
if (empty($title)) {
$title = $um->get_original_filename();
}
$f->title = $title;
$f->description = $description;
$f->location = $reldir . '/' . $um->get_new_filename();
$f->access = $access;
$f->size = $um->get_filesize();
$f->time_uploaded = time();
$file_id = insert_record('files', $f);
$value = trim(optional_param('new_file_keywords'));
insert_tags_from_string($value, 'file', $file_id, $access, $page_owner);
$metadata = optional_param('metadata');
if (is_array($metadata)) {
foreach ($metadata as $name => $value) {
$m = new StdClass();
$m->name = trim($name);
$m->value = trim($value);
$m->file_id = $file_id;
insert_record('file_metadata', $m);
}
}
$rssresult = run("files:rss:publish", array($page_owner, false));