本文整理汇总了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));