本文整理匯總了PHP中file_storage::load_data方法的典型用法代碼示例。如果您正苦於以下問題:PHP file_storage::load_data方法的具體用法?PHP file_storage::load_data怎麽用?PHP file_storage::load_data使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類file_storage
的用法示例。
在下文中一共展示了file_storage::load_data方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
} else {
// make sure the custom ID of the file matches the journal ID
if ($customid != $journalid) {
$_SESSION["error"]["message"][] = "Error: File customid and journal ID do not match";
} else {
// make sure the journal entry belongs to a user
$userid = sql_get_singlevalue("SELECT customid as value FROM journal WHERE journalname='users' AND id='{$journalid}'");
if (!$userid) {
$_SESSION["error"]["message"][] = "Unable to match the provided journal entry to a user journal.";
}
}
}
/*
Produce output - either output request file content,
or take the user to a message page to view errors.
*/
if ($_SESSION["error"]["message"]) {
header("Location: ../index.php?page=message.php");
exit(0);
} else {
// output file data
$file_obj = new file_storage();
$file_obj->id = $fileid;
$file_obj->load_data();
$file_obj->filedata_render();
}
} else {
error_render_noperms();
header("Location: ../index.php?page=message.php");
exit(0);
}