本文整理汇总了PHP中file_storage::filedata_render方法的典型用法代码示例。如果您正苦于以下问题:PHP file_storage::filedata_render方法的具体用法?PHP file_storage::filedata_render怎么用?PHP file_storage::filedata_render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类file_storage
的用法示例。
在下文中一共展示了file_storage::filedata_render方法的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);
}