本文整理匯總了PHP中upload_manager::print_upload_log方法的典型用法代碼示例。如果您正苦於以下問題:PHP upload_manager::print_upload_log方法的具體用法?PHP upload_manager::print_upload_log怎麽用?PHP upload_manager::print_upload_log使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類upload_manager
的用法示例。
在下文中一共展示了upload_manager::print_upload_log方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: moodle_binary_store_file
function moodle_binary_store_file(&$filename, &$id, &$meta, $ext = ".bin")
{
# READ-Only
global $_FILES, $CFG, $course, $wiki, $groupid, $userid, $ewiki_title, $cm;
if (!$wiki->ewikiacceptbinary) {
print_error('cannotacceptbin', 'wiki');
return 0;
}
$entry = wiki_get_entry($wiki, $course, $userid, $groupid);
if (!$entry->id) {
print_error('cannotgetentry', 'wiki');
}
require_once $CFG->dirroot . '/lib/uploadlib.php';
$um = new upload_manager('upload', false, false, $course, false, 0, true, true);
if ($um->process_file_uploads("{$course->id}/{$CFG->moddata}/wiki/{$wiki->id}/{$entry->id}/{$ewiki_title}")) {
$filename = '';
// this to make sure we don't keep processing in the parent function
if (!$id) {
$newfilename = $um->get_new_filename();
$id = EWIKI_IDF_INTERNAL . $newfilename;
}
return true;
}
print_error('uploaderror', 'wiki', '', $um->print_upload_log(true));
return false;
}